From: Sebastian Andrzej Siewior Date: Mon, 22 Oct 2012 20:14:58 +0000 (+0200) Subject: usb: gadget storage: use a computation macro for INT endpoint interval X-Git-Tag: upstream/snapshot3+hdmi~6133^2~59^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64dce9144507d4a6c624fe1b8e0aa88daeae0b9b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git usb: gadget storage: use a computation macro for INT endpoint interval The 9 for HS means 32ms. Use the macro to make it easier to read. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c index 8d9bcd8..14199d7 100644 --- a/drivers/usb/gadget/storage_common.c +++ b/drivers/usb/gadget/storage_common.c @@ -441,7 +441,7 @@ fsg_hs_intr_in_desc = { /* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */ .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = cpu_to_le16(2), - .bInterval = 9, /* 2**(9-1) = 256 uframes -> 32 ms */ + .bInterval = USB_MS_TO_HS_INTERVAL(32), /* 32 ms */ }; #ifndef FSG_NO_OTG @@ -509,7 +509,7 @@ fsg_ss_intr_in_desc = { /* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */ .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = cpu_to_le16(2), - .bInterval = 9, /* 2**(9-1) = 256 uframes -> 32 ms */ + .bInterval = USB_MS_TO_HS_INTERVAL(32), /* 32 ms */ }; static struct usb_ss_ep_comp_descriptor fsg_ss_intr_in_comp_desc = {