aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_acm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/f_acm.c')
-rw-r--r--drivers/usb/gadget/f_acm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index d672250a61fa..7c30bb49850b 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -87,7 +87,7 @@ static inline struct f_acm *port_to_acm(struct gserial *p)
87 87
88/* notification endpoint uses smallish and infrequent fixed-size messages */ 88/* notification endpoint uses smallish and infrequent fixed-size messages */
89 89
90#define GS_LOG2_NOTIFY_INTERVAL 5 /* 1 << 5 == 32 msec */ 90#define GS_NOTIFY_INTERVAL_MS 32
91#define GS_NOTIFY_MAXPACKET 10 /* notification + 2 bytes */ 91#define GS_NOTIFY_MAXPACKET 10 /* notification + 2 bytes */
92 92
93/* interface and class descriptors: */ 93/* interface and class descriptors: */
@@ -167,7 +167,7 @@ static struct usb_endpoint_descriptor acm_fs_notify_desc = {
167 .bEndpointAddress = USB_DIR_IN, 167 .bEndpointAddress = USB_DIR_IN,
168 .bmAttributes = USB_ENDPOINT_XFER_INT, 168 .bmAttributes = USB_ENDPOINT_XFER_INT,
169 .wMaxPacketSize = cpu_to_le16(GS_NOTIFY_MAXPACKET), 169 .wMaxPacketSize = cpu_to_le16(GS_NOTIFY_MAXPACKET),
170 .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL, 170 .bInterval = GS_NOTIFY_INTERVAL_MS,
171}; 171};
172 172
173static struct usb_endpoint_descriptor acm_fs_in_desc = { 173static struct usb_endpoint_descriptor acm_fs_in_desc = {
@@ -199,14 +199,13 @@ static struct usb_descriptor_header *acm_fs_function[] = {
199}; 199};
200 200
201/* high speed support: */ 201/* high speed support: */
202
203static struct usb_endpoint_descriptor acm_hs_notify_desc = { 202static struct usb_endpoint_descriptor acm_hs_notify_desc = {
204 .bLength = USB_DT_ENDPOINT_SIZE, 203 .bLength = USB_DT_ENDPOINT_SIZE,
205 .bDescriptorType = USB_DT_ENDPOINT, 204 .bDescriptorType = USB_DT_ENDPOINT,
206 .bEndpointAddress = USB_DIR_IN, 205 .bEndpointAddress = USB_DIR_IN,
207 .bmAttributes = USB_ENDPOINT_XFER_INT, 206 .bmAttributes = USB_ENDPOINT_XFER_INT,
208 .wMaxPacketSize = cpu_to_le16(GS_NOTIFY_MAXPACKET), 207 .wMaxPacketSize = cpu_to_le16(GS_NOTIFY_MAXPACKET),
209 .bInterval = GS_LOG2_NOTIFY_INTERVAL+4, 208 .bInterval = USB_MS_TO_HS_INTERVAL(GS_NOTIFY_INTERVAL_MS),
210}; 209};
211 210
212static struct usb_endpoint_descriptor acm_hs_in_desc = { 211static struct usb_endpoint_descriptor acm_hs_in_desc = {