diff options
author | Felipe Balbi <balbi@ti.com> | 2012-05-04 10:08:22 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-06-03 20:08:19 (GMT) |
commit | c74c6d4a024d95e81283ee4c38be6fa7baee27f9 (patch) | |
tree | 2771e72d5c349f46eed5fb63ec70902ed60a5be2 /drivers/usb/dwc3 | |
parent | a0807881af93646b5d94b5594119df609e756945 (diff) | |
download | linux-c74c6d4a024d95e81283ee4c38be6fa7baee27f9.tar.xz |
usb: dwc3: ep0: switch over to IS_ALIGNED
IS_ALIGNED provides a much faster operation for
checking proper size alignment then a modulo
operation. Let's use it.
Reported-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 15ec36e..477127a 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -799,7 +799,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, ret = dwc3_ep0_start_trans(dwc, dep->number, dwc->ctrl_req_addr, 0, DWC3_TRBCTL_CONTROL_DATA); - } else if ((req->request.length % dep->endpoint.maxpacket) + } else if (!IS_ALIGNED(req->request.length, dep->endpoint.maxpacket) && (dep->number == 0)) { u32 transfer_size; |