Skip to content

Commit

Permalink
usb: gadget storage: use a computation macro for INT endpoint interval
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Andrzej Siewior authored and Felipe Balbi committed Oct 31, 2012
1 parent bcb2f99 commit 64dce91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/storage_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 64dce91

Please sign in to comment.