USB: dummy-hcd: don't set gadget.speed in dummy_hub_control()
authorRoger Quadros <rogerq@ti.com>
Fri, 3 Nov 2017 11:23:15 +0000 (13:23 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 11 Dec 2017 10:36:52 +0000 (12:36 +0200)
There will never be a case when gadget.speed isn't already
USB_SPEED_FULL if connection is not USB-3 and gadget.speed
is not USB_SPEED_HIGH or USB_SPEED_LOW.

Remove the unnecessary code.

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>
drivers/usb/gadget/udc/dummy_hcd.c

index d0128f92ec5af312af880d7822a316587992b1a8..cf6985b5767c74552e6bb2d9281c366efe837b4c 100644 (file)
@@ -2193,8 +2193,6 @@ static int dummy_hub_control(
                                                        USB_PORT_STAT_LOW_SPEED;
                                                break;
                                        default:
-                                               dum_hcd->dum->gadget.speed =
-                                                       USB_SPEED_FULL;
                                                break;
                                        }
                                }