usb: gadget storage: use a computation macro for INT endpoint interval
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 22 Oct 2012 20:14:58 +0000 (22:14 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 31 Oct 2012 13:02:58 +0000 (15:02 +0200)
The 9 for HS means 32ms. Use the macro to make it easier to read.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/storage_common.c

index 8d9bcd8207c8d1fee7e47813d7d6ee7f76ca0b6b..14199d70beea6e5d42e94a7a939d9c540fe2cff2 100644 (file)
@@ -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 = {