summaryrefslogtreecommitdiff
path: root/drivers/staging/octeon-usb/octeon-hcd.c
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2014-08-31 23:43:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-02 10:48:32 -0700
commit96ee2cc81f278d6c0767f466c11658f5beb5d7c5 (patch)
tree195825ddb0c851c1ac1e8a0eddb4592e3af3e39b /drivers/staging/octeon-usb/octeon-hcd.c
parente301dfb208ac25db6c133079de7ae5d99cf48b5f (diff)
staging: octeon-usb: use USB_DIR_IN
Replace a magic value with #defined macro. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon-usb/octeon-hcd.c')
-rw-r--r--drivers/staging/octeon-usb/octeon-hcd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index f478f591e40c..3a5feb4ff182 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -1554,24 +1554,24 @@ static void __cvmx_usb_start_channel_control(struct cvmx_usb_state *usb,
case CVMX_USB_STAGE_DATA:
usbc_hctsiz.s.pid = __cvmx_usb_get_data_pid(pipe);
if (__cvmx_usb_pipe_needs_split(usb, pipe)) {
- if (header->bRequestType & 0x80)
+ if (header->bRequestType & USB_DIR_IN)
bytes_to_transfer = 0;
else if (bytes_to_transfer > pipe->max_packet)
bytes_to_transfer = pipe->max_packet;
}
USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
union cvmx_usbcx_hccharx, epdir,
- ((header->bRequestType & 0x80) ?
+ ((header->bRequestType & USB_DIR_IN) ?
CVMX_USB_DIRECTION_IN :
CVMX_USB_DIRECTION_OUT));
break;
case CVMX_USB_STAGE_DATA_SPLIT_COMPLETE:
usbc_hctsiz.s.pid = __cvmx_usb_get_data_pid(pipe);
- if (!(header->bRequestType & 0x80))
+ if (!(header->bRequestType & USB_DIR_IN))
bytes_to_transfer = 0;
USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
union cvmx_usbcx_hccharx, epdir,
- ((header->bRequestType & 0x80) ?
+ ((header->bRequestType & USB_DIR_IN) ?
CVMX_USB_DIRECTION_IN :
CVMX_USB_DIRECTION_OUT));
USB_SET_FIELD32(CVMX_USBCX_HCSPLTX(channel, usb->index),
@@ -1582,7 +1582,7 @@ static void __cvmx_usb_start_channel_control(struct cvmx_usb_state *usb,
bytes_to_transfer = 0;
USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
union cvmx_usbcx_hccharx, epdir,
- ((header->bRequestType & 0x80) ?
+ ((header->bRequestType & USB_DIR_IN) ?
CVMX_USB_DIRECTION_OUT :
CVMX_USB_DIRECTION_IN));
break;
@@ -1591,7 +1591,7 @@ static void __cvmx_usb_start_channel_control(struct cvmx_usb_state *usb,
bytes_to_transfer = 0;
USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index),
union cvmx_usbcx_hccharx, epdir,
- ((header->bRequestType & 0x80) ?
+ ((header->bRequestType & USB_DIR_IN) ?
CVMX_USB_DIRECTION_OUT :
CVMX_USB_DIRECTION_IN));
USB_SET_FIELD32(CVMX_USBCX_HCSPLTX(channel, usb->index),
@@ -2424,7 +2424,7 @@ static struct cvmx_usb_transaction *cvmx_usb_submit_control(
uint64_t control_header = urb->setup_dma;
struct usb_ctrlrequest *header = cvmx_phys_to_ptr(control_header);
- if ((header->bRequestType & 0x80) == 0)
+ if ((header->bRequestType & USB_DIR_IN) == 0)
buffer_length = le16_to_cpu(header->wLength);
return __cvmx_usb_submit_transaction(usb, pipe,