aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/audio.c1
-rw-r--r--drivers/usb/gadget/cdc2.c1
-rw-r--r--drivers/usb/gadget/composite.c2
-rw-r--r--drivers/usb/gadget/ether.c1
-rw-r--r--drivers/usb/gadget/g_ffs.c1
-rw-r--r--drivers/usb/gadget/hid.c1
-rw-r--r--drivers/usb/gadget/mass_storage.c1
-rw-r--r--drivers/usb/gadget/multi.c1
-rw-r--r--drivers/usb/gadget/ncm.c1
-rw-r--r--drivers/usb/gadget/nokia.c1
-rw-r--r--drivers/usb/gadget/serial.c1
-rw-r--r--drivers/usb/gadget/webcam.c1
-rw-r--r--drivers/usb/gadget/zero.c1
-rw-r--r--include/linux/usb/composite.h2
14 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c
index 93b999e49ef3..9d89ae4765a9 100644
--- a/drivers/usb/gadget/audio.c
+++ b/drivers/usb/gadget/audio.c
@@ -165,6 +165,7 @@ static struct usb_composite_driver audio_driver = {
165 .name = "g_audio", 165 .name = "g_audio",
166 .dev = &device_desc, 166 .dev = &device_desc,
167 .strings = audio_strings, 167 .strings = audio_strings,
168 .max_speed = USB_SPEED_HIGH,
168 .unbind = __exit_p(audio_unbind), 169 .unbind = __exit_p(audio_unbind),
169}; 170};
170 171
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c
index 2720ab07ef1a..b1c1afbb8750 100644
--- a/drivers/usb/gadget/cdc2.c
+++ b/drivers/usb/gadget/cdc2.c
@@ -244,6 +244,7 @@ static struct usb_composite_driver cdc_driver = {
244 .name = "g_cdc", 244 .name = "g_cdc",
245 .dev = &device_desc, 245 .dev = &device_desc,
246 .strings = dev_strings, 246 .strings = dev_strings,
247 .max_speed = USB_SPEED_HIGH,
247 .unbind = __exit_p(cdc_unbind), 248 .unbind = __exit_p(cdc_unbind),
248}; 249};
249 250
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index ed8a70f271f4..897e4f57422f 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1386,6 +1386,8 @@ int usb_composite_probe(struct usb_composite_driver *driver,
1386 driver->iProduct = driver->name; 1386 driver->iProduct = driver->name;
1387 composite_driver.function = (char *) driver->name; 1387 composite_driver.function = (char *) driver->name;
1388 composite_driver.driver.name = driver->name; 1388 composite_driver.driver.name = driver->name;
1389 composite_driver.speed = min((u8)composite_driver.speed,
1390 (u8)driver->max_speed);
1389 composite = driver; 1391 composite = driver;
1390 composite_gadget_bind = bind; 1392 composite_gadget_bind = bind;
1391 1393
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 1690c9d68256..ac41858800a5 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -401,6 +401,7 @@ static struct usb_composite_driver eth_driver = {
401 .name = "g_ether", 401 .name = "g_ether",
402 .dev = &device_desc, 402 .dev = &device_desc,
403 .strings = dev_strings, 403 .strings = dev_strings,
404 .max_speed = USB_SPEED_HIGH,
404 .unbind = __exit_p(eth_unbind), 405 .unbind = __exit_p(eth_unbind),
405}; 406};
406 407
diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c
index ebf6970a10bf..704c2800ac00 100644
--- a/drivers/usb/gadget/g_ffs.c
+++ b/drivers/usb/gadget/g_ffs.c
@@ -162,6 +162,7 @@ static struct usb_composite_driver gfs_driver = {
162 .name = DRIVER_NAME, 162 .name = DRIVER_NAME,
163 .dev = &gfs_dev_desc, 163 .dev = &gfs_dev_desc,
164 .strings = gfs_dev_strings, 164 .strings = gfs_dev_strings,
165 .max_speed = USB_SPEED_HIGH,
165 .unbind = gfs_unbind, 166 .unbind = gfs_unbind,
166 .iProduct = DRIVER_DESC, 167 .iProduct = DRIVER_DESC,
167}; 168};
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c
index 2523e54097bd..9fb575034a0e 100644
--- a/drivers/usb/gadget/hid.c
+++ b/drivers/usb/gadget/hid.c
@@ -255,6 +255,7 @@ static struct usb_composite_driver hidg_driver = {
255 .name = "g_hid", 255 .name = "g_hid",
256 .dev = &device_desc, 256 .dev = &device_desc,
257 .strings = dev_strings, 257 .strings = dev_strings,
258 .max_speed = USB_SPEED_HIGH,
258 .unbind = __exit_p(hid_unbind), 259 .unbind = __exit_p(hid_unbind),
259}; 260};
260 261
diff --git a/drivers/usb/gadget/mass_storage.c b/drivers/usb/gadget/mass_storage.c
index 01822422c3e8..d3eb27427c58 100644
--- a/drivers/usb/gadget/mass_storage.c
+++ b/drivers/usb/gadget/mass_storage.c
@@ -169,6 +169,7 @@ static struct usb_composite_driver msg_driver = {
169 .name = "g_mass_storage", 169 .name = "g_mass_storage",
170 .dev = &msg_device_desc, 170 .dev = &msg_device_desc,
171 .iProduct = DRIVER_DESC, 171 .iProduct = DRIVER_DESC,
172 .max_speed = USB_SPEED_HIGH,
172 .needs_serial = 1, 173 .needs_serial = 1,
173}; 174};
174 175
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c
index d9feced348e3..8c7b74717d85 100644
--- a/drivers/usb/gadget/multi.c
+++ b/drivers/usb/gadget/multi.c
@@ -351,6 +351,7 @@ static struct usb_composite_driver multi_driver = {
351 .name = "g_multi", 351 .name = "g_multi",
352 .dev = &device_desc, 352 .dev = &device_desc,
353 .strings = dev_strings, 353 .strings = dev_strings,
354 .max_speed = USB_SPEED_HIGH,
354 .unbind = __exit_p(multi_unbind), 355 .unbind = __exit_p(multi_unbind),
355 .iProduct = DRIVER_DESC, 356 .iProduct = DRIVER_DESC,
356 .needs_serial = 1, 357 .needs_serial = 1,
diff --git a/drivers/usb/gadget/ncm.c b/drivers/usb/gadget/ncm.c
index 99c179ad729d..62ee5087dcac 100644
--- a/drivers/usb/gadget/ncm.c
+++ b/drivers/usb/gadget/ncm.c
@@ -228,6 +228,7 @@ static struct usb_composite_driver ncm_driver = {
228 .name = "g_ncm", 228 .name = "g_ncm",
229 .dev = &device_desc, 229 .dev = &device_desc,
230 .strings = dev_strings, 230 .strings = dev_strings,
231 .max_speed = USB_SPEED_HIGH,
231 .unbind = __exit_p(gncm_unbind), 232 .unbind = __exit_p(gncm_unbind),
232}; 233};
233 234
diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c
index 55ca63ad3506..c7fb7723c014 100644
--- a/drivers/usb/gadget/nokia.c
+++ b/drivers/usb/gadget/nokia.c
@@ -241,6 +241,7 @@ static struct usb_composite_driver nokia_driver = {
241 .name = "g_nokia", 241 .name = "g_nokia",
242 .dev = &device_desc, 242 .dev = &device_desc,
243 .strings = dev_strings, 243 .strings = dev_strings,
244 .max_speed = USB_SPEED_HIGH,
244 .unbind = __exit_p(nokia_unbind), 245 .unbind = __exit_p(nokia_unbind),
245}; 246};
246 247
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 1ac57a973aa9..ed1b816e58d8 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -242,6 +242,7 @@ static struct usb_composite_driver gserial_driver = {
242 .name = "g_serial", 242 .name = "g_serial",
243 .dev = &device_desc, 243 .dev = &device_desc,
244 .strings = dev_strings, 244 .strings = dev_strings,
245 .max_speed = USB_SPEED_HIGH,
245}; 246};
246 247
247static int __init init(void) 248static int __init init(void)
diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c
index a5a0fdb808c7..df6882de50bf 100644
--- a/drivers/usb/gadget/webcam.c
+++ b/drivers/usb/gadget/webcam.c
@@ -373,6 +373,7 @@ static struct usb_composite_driver webcam_driver = {
373 .name = "g_webcam", 373 .name = "g_webcam",
374 .dev = &webcam_device_descriptor, 374 .dev = &webcam_device_descriptor,
375 .strings = webcam_device_strings, 375 .strings = webcam_device_strings,
376 .max_speed = USB_SPEED_HIGH,
376 .unbind = webcam_unbind, 377 .unbind = webcam_unbind,
377}; 378};
378 379
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 6d16db9d9d2d..af7e7c3818d8 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -340,6 +340,7 @@ static struct usb_composite_driver zero_driver = {
340 .name = "zero", 340 .name = "zero",
341 .dev = &device_desc, 341 .dev = &device_desc,
342 .strings = dev_strings, 342 .strings = dev_strings,
343 .max_speed = USB_SPEED_HIGH,
343 .unbind = zero_unbind, 344 .unbind = zero_unbind,
344 .suspend = zero_suspend, 345 .suspend = zero_suspend,
345 .resume = zero_resume, 346 .resume = zero_resume,
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 99830d63d8f1..a3e72dfa6996 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -240,6 +240,7 @@ int usb_add_config(struct usb_composite_dev *,
240 * identifiers. 240 * identifiers.
241 * @strings: tables of strings, keyed by identifiers assigned during bind() 241 * @strings: tables of strings, keyed by identifiers assigned during bind()
242 * and language IDs provided in control requests 242 * and language IDs provided in control requests
243 * @max_speed: Highest speed the driver supports.
243 * @needs_serial: set to 1 if the gadget needs userspace to provide 244 * @needs_serial: set to 1 if the gadget needs userspace to provide
244 * a serial number. If one is not provided, warning will be printed. 245 * a serial number. If one is not provided, warning will be printed.
245 * @unbind: Reverses bind; called as a side effect of unregistering 246 * @unbind: Reverses bind; called as a side effect of unregistering
@@ -267,6 +268,7 @@ struct usb_composite_driver {
267 const char *iManufacturer; 268 const char *iManufacturer;
268 const struct usb_device_descriptor *dev; 269 const struct usb_device_descriptor *dev;
269 struct usb_gadget_strings **strings; 270 struct usb_gadget_strings **strings;
271 enum usb_device_speed max_speed;
270 unsigned needs_serial:1; 272 unsigned needs_serial:1;
271 273
272 int (*unbind)(struct usb_composite_dev *); 274 int (*unbind)(struct usb_composite_dev *);