summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2017-11-02 12:09:17 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-12-11 13:36:52 +0300
commitd855e08cf623835bc3208209cd9ab32d6c710162 (patch)
treed1786065c4c44408f8bbccbcab29461419316afa /drivers/usb/gadget/udc
parent8ea409044ca0f8504b69ece3ef69191aa846090b (diff)
downloadlinux-d855e08cf623835bc3208209cd9ab32d6c710162.tar.xz
USB: dummy-hcd: Adapt dummy_udc_set_speed()
The UDC core ensures that .udc_set_speed() is called with a speed that is a minimum of the max speeds supported by the gadget function driver and the UDC driver. We can now use the speed argument as is. Get rid of the debug print as that condition will never happen. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/udc')
-rw-r--r--drivers/usb/gadget/udc/dummy_hcd.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index cf6985b5767c..e744d4b7bfed 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -925,20 +925,8 @@ static void dummy_udc_set_speed(struct usb_gadget *_gadget,
struct dummy *dum;
dum = gadget_dev_to_dummy(&_gadget->dev);
-
- if (mod_data.is_super_speed)
- dum->gadget.speed = min_t(u8, USB_SPEED_SUPER, speed);
- else if (mod_data.is_high_speed)
- dum->gadget.speed = min_t(u8, USB_SPEED_HIGH, speed);
- else
- dum->gadget.speed = USB_SPEED_FULL;
-
+ dum->gadget.speed = speed;
dummy_udc_update_ep0(dum);
-
- if (dum->gadget.speed < speed)
- dev_dbg(udc_dev(dum), "This device can perform faster"
- " if you connect it to a %s port...\n",
- usb_speed_string(speed));
}
static int dummy_udc_start(struct usb_gadget *g,