diff options
Diffstat (limited to 'drivers/usb/gadget/f_acm.c')
-rw-r--r-- | drivers/usb/gadget/f_acm.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index 400e1ebe6976..d47a123f15ab 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c | |||
@@ -116,7 +116,7 @@ acm_iad_descriptor = { | |||
116 | }; | 116 | }; |
117 | 117 | ||
118 | 118 | ||
119 | static struct usb_interface_descriptor acm_control_interface_desc __initdata = { | 119 | static struct usb_interface_descriptor acm_control_interface_desc = { |
120 | .bLength = USB_DT_INTERFACE_SIZE, | 120 | .bLength = USB_DT_INTERFACE_SIZE, |
121 | .bDescriptorType = USB_DT_INTERFACE, | 121 | .bDescriptorType = USB_DT_INTERFACE, |
122 | /* .bInterfaceNumber = DYNAMIC */ | 122 | /* .bInterfaceNumber = DYNAMIC */ |
@@ -127,7 +127,7 @@ static struct usb_interface_descriptor acm_control_interface_desc __initdata = { | |||
127 | /* .iInterface = DYNAMIC */ | 127 | /* .iInterface = DYNAMIC */ |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static struct usb_interface_descriptor acm_data_interface_desc __initdata = { | 130 | static struct usb_interface_descriptor acm_data_interface_desc = { |
131 | .bLength = USB_DT_INTERFACE_SIZE, | 131 | .bLength = USB_DT_INTERFACE_SIZE, |
132 | .bDescriptorType = USB_DT_INTERFACE, | 132 | .bDescriptorType = USB_DT_INTERFACE, |
133 | /* .bInterfaceNumber = DYNAMIC */ | 133 | /* .bInterfaceNumber = DYNAMIC */ |
@@ -138,7 +138,7 @@ static struct usb_interface_descriptor acm_data_interface_desc __initdata = { | |||
138 | /* .iInterface = DYNAMIC */ | 138 | /* .iInterface = DYNAMIC */ |
139 | }; | 139 | }; |
140 | 140 | ||
141 | static struct usb_cdc_header_desc acm_header_desc __initdata = { | 141 | static struct usb_cdc_header_desc acm_header_desc = { |
142 | .bLength = sizeof(acm_header_desc), | 142 | .bLength = sizeof(acm_header_desc), |
143 | .bDescriptorType = USB_DT_CS_INTERFACE, | 143 | .bDescriptorType = USB_DT_CS_INTERFACE, |
144 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, | 144 | .bDescriptorSubType = USB_CDC_HEADER_TYPE, |
@@ -146,7 +146,7 @@ static struct usb_cdc_header_desc acm_header_desc __initdata = { | |||
146 | }; | 146 | }; |
147 | 147 | ||
148 | static struct usb_cdc_call_mgmt_descriptor | 148 | static struct usb_cdc_call_mgmt_descriptor |
149 | acm_call_mgmt_descriptor __initdata = { | 149 | acm_call_mgmt_descriptor = { |
150 | .bLength = sizeof(acm_call_mgmt_descriptor), | 150 | .bLength = sizeof(acm_call_mgmt_descriptor), |
151 | .bDescriptorType = USB_DT_CS_INTERFACE, | 151 | .bDescriptorType = USB_DT_CS_INTERFACE, |
152 | .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE, | 152 | .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE, |
@@ -154,14 +154,14 @@ acm_call_mgmt_descriptor __initdata = { | |||
154 | /* .bDataInterface = DYNAMIC */ | 154 | /* .bDataInterface = DYNAMIC */ |
155 | }; | 155 | }; |
156 | 156 | ||
157 | static struct usb_cdc_acm_descriptor acm_descriptor __initdata = { | 157 | static struct usb_cdc_acm_descriptor acm_descriptor = { |
158 | .bLength = sizeof(acm_descriptor), | 158 | .bLength = sizeof(acm_descriptor), |
159 | .bDescriptorType = USB_DT_CS_INTERFACE, | 159 | .bDescriptorType = USB_DT_CS_INTERFACE, |
160 | .bDescriptorSubType = USB_CDC_ACM_TYPE, | 160 | .bDescriptorSubType = USB_CDC_ACM_TYPE, |
161 | .bmCapabilities = USB_CDC_CAP_LINE, | 161 | .bmCapabilities = USB_CDC_CAP_LINE, |
162 | }; | 162 | }; |
163 | 163 | ||
164 | static struct usb_cdc_union_desc acm_union_desc __initdata = { | 164 | static struct usb_cdc_union_desc acm_union_desc = { |
165 | .bLength = sizeof(acm_union_desc), | 165 | .bLength = sizeof(acm_union_desc), |
166 | .bDescriptorType = USB_DT_CS_INTERFACE, | 166 | .bDescriptorType = USB_DT_CS_INTERFACE, |
167 | .bDescriptorSubType = USB_CDC_UNION_TYPE, | 167 | .bDescriptorSubType = USB_CDC_UNION_TYPE, |
@@ -171,7 +171,7 @@ static struct usb_cdc_union_desc acm_union_desc __initdata = { | |||
171 | 171 | ||
172 | /* full speed support: */ | 172 | /* full speed support: */ |
173 | 173 | ||
174 | static struct usb_endpoint_descriptor acm_fs_notify_desc __initdata = { | 174 | static struct usb_endpoint_descriptor acm_fs_notify_desc = { |
175 | .bLength = USB_DT_ENDPOINT_SIZE, | 175 | .bLength = USB_DT_ENDPOINT_SIZE, |
176 | .bDescriptorType = USB_DT_ENDPOINT, | 176 | .bDescriptorType = USB_DT_ENDPOINT, |
177 | .bEndpointAddress = USB_DIR_IN, | 177 | .bEndpointAddress = USB_DIR_IN, |
@@ -180,21 +180,21 @@ static struct usb_endpoint_descriptor acm_fs_notify_desc __initdata = { | |||
180 | .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL, | 180 | .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL, |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static struct usb_endpoint_descriptor acm_fs_in_desc __initdata = { | 183 | static struct usb_endpoint_descriptor acm_fs_in_desc = { |
184 | .bLength = USB_DT_ENDPOINT_SIZE, | 184 | .bLength = USB_DT_ENDPOINT_SIZE, |
185 | .bDescriptorType = USB_DT_ENDPOINT, | 185 | .bDescriptorType = USB_DT_ENDPOINT, |
186 | .bEndpointAddress = USB_DIR_IN, | 186 | .bEndpointAddress = USB_DIR_IN, |
187 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 187 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
188 | }; | 188 | }; |
189 | 189 | ||
190 | static struct usb_endpoint_descriptor acm_fs_out_desc __initdata = { | 190 | static struct usb_endpoint_descriptor acm_fs_out_desc = { |
191 | .bLength = USB_DT_ENDPOINT_SIZE, | 191 | .bLength = USB_DT_ENDPOINT_SIZE, |
192 | .bDescriptorType = USB_DT_ENDPOINT, | 192 | .bDescriptorType = USB_DT_ENDPOINT, |
193 | .bEndpointAddress = USB_DIR_OUT, | 193 | .bEndpointAddress = USB_DIR_OUT, |
194 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 194 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static struct usb_descriptor_header *acm_fs_function[] __initdata = { | 197 | static struct usb_descriptor_header *acm_fs_function[] = { |
198 | (struct usb_descriptor_header *) &acm_iad_descriptor, | 198 | (struct usb_descriptor_header *) &acm_iad_descriptor, |
199 | (struct usb_descriptor_header *) &acm_control_interface_desc, | 199 | (struct usb_descriptor_header *) &acm_control_interface_desc, |
200 | (struct usb_descriptor_header *) &acm_header_desc, | 200 | (struct usb_descriptor_header *) &acm_header_desc, |
@@ -210,7 +210,7 @@ static struct usb_descriptor_header *acm_fs_function[] __initdata = { | |||
210 | 210 | ||
211 | /* high speed support: */ | 211 | /* high speed support: */ |
212 | 212 | ||
213 | static struct usb_endpoint_descriptor acm_hs_notify_desc __initdata = { | 213 | static struct usb_endpoint_descriptor acm_hs_notify_desc = { |
214 | .bLength = USB_DT_ENDPOINT_SIZE, | 214 | .bLength = USB_DT_ENDPOINT_SIZE, |
215 | .bDescriptorType = USB_DT_ENDPOINT, | 215 | .bDescriptorType = USB_DT_ENDPOINT, |
216 | .bEndpointAddress = USB_DIR_IN, | 216 | .bEndpointAddress = USB_DIR_IN, |
@@ -219,21 +219,21 @@ static struct usb_endpoint_descriptor acm_hs_notify_desc __initdata = { | |||
219 | .bInterval = GS_LOG2_NOTIFY_INTERVAL+4, | 219 | .bInterval = GS_LOG2_NOTIFY_INTERVAL+4, |
220 | }; | 220 | }; |
221 | 221 | ||
222 | static struct usb_endpoint_descriptor acm_hs_in_desc __initdata = { | 222 | static struct usb_endpoint_descriptor acm_hs_in_desc = { |
223 | .bLength = USB_DT_ENDPOINT_SIZE, | 223 | .bLength = USB_DT_ENDPOINT_SIZE, |
224 | .bDescriptorType = USB_DT_ENDPOINT, | 224 | .bDescriptorType = USB_DT_ENDPOINT, |
225 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 225 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
226 | .wMaxPacketSize = cpu_to_le16(512), | 226 | .wMaxPacketSize = cpu_to_le16(512), |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static struct usb_endpoint_descriptor acm_hs_out_desc __initdata = { | 229 | static struct usb_endpoint_descriptor acm_hs_out_desc = { |
230 | .bLength = USB_DT_ENDPOINT_SIZE, | 230 | .bLength = USB_DT_ENDPOINT_SIZE, |
231 | .bDescriptorType = USB_DT_ENDPOINT, | 231 | .bDescriptorType = USB_DT_ENDPOINT, |
232 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 232 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
233 | .wMaxPacketSize = cpu_to_le16(512), | 233 | .wMaxPacketSize = cpu_to_le16(512), |
234 | }; | 234 | }; |
235 | 235 | ||
236 | static struct usb_descriptor_header *acm_hs_function[] __initdata = { | 236 | static struct usb_descriptor_header *acm_hs_function[] = { |
237 | (struct usb_descriptor_header *) &acm_iad_descriptor, | 237 | (struct usb_descriptor_header *) &acm_iad_descriptor, |
238 | (struct usb_descriptor_header *) &acm_control_interface_desc, | 238 | (struct usb_descriptor_header *) &acm_control_interface_desc, |
239 | (struct usb_descriptor_header *) &acm_header_desc, | 239 | (struct usb_descriptor_header *) &acm_header_desc, |
@@ -571,7 +571,7 @@ static int acm_send_break(struct gserial *port, int duration) | |||
571 | /*-------------------------------------------------------------------------*/ | 571 | /*-------------------------------------------------------------------------*/ |
572 | 572 | ||
573 | /* ACM function driver setup/binding */ | 573 | /* ACM function driver setup/binding */ |
574 | static int __init | 574 | static int |
575 | acm_bind(struct usb_configuration *c, struct usb_function *f) | 575 | acm_bind(struct usb_configuration *c, struct usb_function *f) |
576 | { | 576 | { |
577 | struct usb_composite_dev *cdev = c->cdev; | 577 | struct usb_composite_dev *cdev = c->cdev; |
@@ -719,7 +719,7 @@ static inline bool can_support_cdc(struct usb_configuration *c) | |||
719 | * handle all the ones it binds. Caller is also responsible | 719 | * handle all the ones it binds. Caller is also responsible |
720 | * for calling @gserial_cleanup() before module unload. | 720 | * for calling @gserial_cleanup() before module unload. |
721 | */ | 721 | */ |
722 | int __init acm_bind_config(struct usb_configuration *c, u8 port_num) | 722 | int acm_bind_config(struct usb_configuration *c, u8 port_num) |
723 | { | 723 | { |
724 | struct f_acm *acm; | 724 | struct f_acm *acm; |
725 | int status; | 725 | int status; |