commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=3db116a183267c6b80a79416d630e7502a7b6966
branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/trunk

Signed-off-by: Scott Jiang <[email protected]>
---
 drivers/usb/gadget/composite.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 2a6bfe7..3d8246c 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1530,6 +1530,11 @@ composite_resume(struct usb_gadget *gadget)
 /*-------------------------------------------------------------------------*/
 
 static const struct usb_gadget_driver composite_driver_template = {
+#ifdef CONFIG_USB_GADGET_SUPERSPEED
+	.max_speed	= USB_SPEED_SUPER,
+#else
+	.max_speed	= USB_SPEED_HIGH,
+#endif
 	.bind		= composite_bind,
 	.unbind		= composite_unbind,
 
@@ -1578,7 +1583,8 @@ int usb_composite_probe(struct usb_composite_driver *driver)
 
 	gadget_driver->function =  (char *) driver->name;
 	gadget_driver->driver.name = driver->name;
-	gadget_driver->max_speed = driver->max_speed;
+	gadget_driver->max_speed =
+		min_t(u8, gadget_driver->max_speed, driver->max_speed);
 
 	return usb_gadget_probe_driver(gadget_driver);
 }
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to