Commit 1155a7b8 authored by Alexander Shishkin's avatar Alexander Shishkin Committed by Greg Kroah-Hartman

usb: gadget: ci13xxx: drop needless parens

Small and self-evident cleanup.
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent df767b71
...@@ -1760,14 +1760,14 @@ __acquires(mEp->lock) ...@@ -1760,14 +1760,14 @@ __acquires(mEp->lock)
if ((setup->bRequestType & USB_RECIP_MASK) == USB_RECIP_DEVICE) { if ((setup->bRequestType & USB_RECIP_MASK) == USB_RECIP_DEVICE) {
/* Assume that device is bus powered for now. */ /* Assume that device is bus powered for now. */
*((u16 *)req->buf) = _udc->remote_wakeup << 1; *(u16 *)req->buf = _udc->remote_wakeup << 1;
retval = 0; retval = 0;
} else if ((setup->bRequestType & USB_RECIP_MASK) \ } else if ((setup->bRequestType & USB_RECIP_MASK) \
== USB_RECIP_ENDPOINT) { == USB_RECIP_ENDPOINT) {
dir = (le16_to_cpu(setup->wIndex) & USB_ENDPOINT_DIR_MASK) ? dir = (le16_to_cpu(setup->wIndex) & USB_ENDPOINT_DIR_MASK) ?
TX : RX; TX : RX;
num = le16_to_cpu(setup->wIndex) & USB_ENDPOINT_NUMBER_MASK; num = le16_to_cpu(setup->wIndex) & USB_ENDPOINT_NUMBER_MASK;
*((u16 *)req->buf) = hw_ep_get_halt(num, dir); *(u16 *)req->buf = hw_ep_get_halt(num, dir);
} }
/* else do nothing; reserved for future use */ /* else do nothing; reserved for future use */
...@@ -2284,8 +2284,8 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req, ...@@ -2284,8 +2284,8 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req,
goto done; goto done;
} }
if (req->length > (4 * CI13XXX_PAGE_SIZE)) { if (req->length > 4 * CI13XXX_PAGE_SIZE) {
req->length = (4 * CI13XXX_PAGE_SIZE); req->length = 4 * CI13XXX_PAGE_SIZE;
retval = -EMSGSIZE; retval = -EMSGSIZE;
warn("request length truncated"); warn("request length truncated");
} }
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
* DEFINE * DEFINE
*****************************************************************************/ *****************************************************************************/
#define CI13XXX_PAGE_SIZE 4096ul /* page size for TD's */ #define CI13XXX_PAGE_SIZE 4096ul /* page size for TD's */
#define ENDPT_MAX (32) #define ENDPT_MAX 32
#define CTRL_PAYLOAD_MAX (64) #define CTRL_PAYLOAD_MAX 64
#define RX (0) /* similar to USB_DIR_OUT but can be used as an index */ #define RX 0 /* similar to USB_DIR_OUT but can be used as an index */
#define TX (1) /* similar to USB_DIR_IN but can be used as an index */ #define TX 1 /* similar to USB_DIR_IN but can be used as an index */
/****************************************************************************** /******************************************************************************
* STRUCTURES * STRUCTURES
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment