diff options
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index cf235d84d8b7..db815c2da7ed 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -823,19 +823,18 @@ static int dummy_pullup (struct usb_gadget *_gadget, int value) | |||
823 | 823 | ||
824 | if (value && dum->driver) { | 824 | if (value && dum->driver) { |
825 | if (mod_data.is_super_speed) | 825 | if (mod_data.is_super_speed) |
826 | dum->gadget.speed = dum->driver->speed; | 826 | dum->gadget.speed = dum->driver->max_speed; |
827 | else if (mod_data.is_high_speed) | 827 | else if (mod_data.is_high_speed) |
828 | dum->gadget.speed = min_t(u8, USB_SPEED_HIGH, | 828 | dum->gadget.speed = min_t(u8, USB_SPEED_HIGH, |
829 | dum->driver->speed); | 829 | dum->driver->max_speed); |
830 | else | 830 | else |
831 | dum->gadget.speed = USB_SPEED_FULL; | 831 | dum->gadget.speed = USB_SPEED_FULL; |
832 | dummy_udc_udpate_ep0(dum); | 832 | dummy_udc_udpate_ep0(dum); |
833 | 833 | ||
834 | if (dum->gadget.speed < dum->driver->speed) | 834 | if (dum->gadget.speed < dum->driver->max_speed) |
835 | dev_dbg(udc_dev(dum), "This device can perform faster" | 835 | dev_dbg(udc_dev(dum), "This device can perform faster" |
836 | " if you connect it to a %s port...\n", | 836 | " if you connect it to a %s port...\n", |
837 | (dum->driver->speed == USB_SPEED_SUPER ? | 837 | usb_speed_string(dum->driver->max_speed)); |
838 | "SuperSpeed" : "HighSpeed")); | ||
839 | } | 838 | } |
840 | dum_hcd = gadget_to_dummy_hcd(_gadget); | 839 | dum_hcd = gadget_to_dummy_hcd(_gadget); |
841 | 840 | ||
@@ -898,7 +897,7 @@ static int dummy_udc_start(struct usb_gadget *g, | |||
898 | struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g); | 897 | struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g); |
899 | struct dummy *dum = dum_hcd->dum; | 898 | struct dummy *dum = dum_hcd->dum; |
900 | 899 | ||
901 | if (driver->speed == USB_SPEED_UNKNOWN) | 900 | if (driver->max_speed == USB_SPEED_UNKNOWN) |
902 | return -EINVAL; | 901 | return -EINVAL; |
903 | 902 | ||
904 | /* | 903 | /* |