aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/amd5536udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/amd5536udc.c')
-rw-r--r--drivers/usb/gadget/amd5536udc.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c
index 75973f33a4c8..eee01ea70f8c 100644
--- a/drivers/usb/gadget/amd5536udc.c
+++ b/drivers/usb/gadget/amd5536udc.c
@@ -3080,7 +3080,6 @@ static void udc_pci_remove(struct pci_dev *pdev)
3080 if (dev->active) 3080 if (dev->active)
3081 pci_disable_device(pdev); 3081 pci_disable_device(pdev);
3082 3082
3083 device_unregister(&dev->gadget.dev);
3084 pci_set_drvdata(pdev, NULL); 3083 pci_set_drvdata(pdev, NULL);
3085 3084
3086 udc_remove(dev); 3085 udc_remove(dev);
@@ -3276,6 +3275,7 @@ static int udc_probe(struct udc *dev)
3276 dev->gadget.dev.release = gadget_release; 3275 dev->gadget.dev.release = gadget_release;
3277 dev->gadget.name = name; 3276 dev->gadget.name = name;
3278 dev->gadget.max_speed = USB_SPEED_HIGH; 3277 dev->gadget.max_speed = USB_SPEED_HIGH;
3278 dev->gadget.register_my_device = true;
3279 3279
3280 /* init registers, interrupts, ... */ 3280 /* init registers, interrupts, ... */
3281 startup_registers(dev); 3281 startup_registers(dev);
@@ -3301,13 +3301,6 @@ static int udc_probe(struct udc *dev)
3301 if (retval) 3301 if (retval)
3302 goto finished; 3302 goto finished;
3303 3303
3304 retval = device_register(&dev->gadget.dev);
3305 if (retval) {
3306 usb_del_gadget_udc(&dev->gadget);
3307 put_device(&dev->gadget.dev);
3308 goto finished;
3309 }
3310
3311 /* timer init */ 3304 /* timer init */
3312 init_timer(&udc_timer); 3305 init_timer(&udc_timer);
3313 udc_timer.function = udc_timer_function; 3306 udc_timer.function = udc_timer_function;