aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/goku_udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/goku_udc.c')
-rw-r--r--drivers/usb/gadget/goku_udc.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
index 805a9826842d..d0ef1d6b3fac 100644
--- a/drivers/usb/gadget/goku_udc.c
+++ b/drivers/usb/gadget/goku_udc.c
@@ -1432,7 +1432,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
1432 if (!driver 1432 if (!driver
1433 || driver->speed != USB_SPEED_FULL 1433 || driver->speed != USB_SPEED_FULL
1434 || !driver->bind 1434 || !driver->bind
1435 || !driver->unbind
1436 || !driver->disconnect 1435 || !driver->disconnect
1437 || !driver->setup) 1436 || !driver->setup)
1438 return -EINVAL; 1437 return -EINVAL;
@@ -1495,7 +1494,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
1495 1494
1496 if (!dev) 1495 if (!dev)
1497 return -ENODEV; 1496 return -ENODEV;
1498 if (!driver || driver != dev->driver) 1497 if (!driver || driver != dev->driver || !driver->unbind)
1499 return -EINVAL; 1498 return -EINVAL;
1500 1499
1501 spin_lock_irqsave(&dev->lock, flags); 1500 spin_lock_irqsave(&dev->lock, flags);
@@ -1808,13 +1807,8 @@ static void goku_remove(struct pci_dev *pdev)
1808 struct goku_udc *dev = pci_get_drvdata(pdev); 1807 struct goku_udc *dev = pci_get_drvdata(pdev);
1809 1808
1810 DBG(dev, "%s\n", __FUNCTION__); 1809 DBG(dev, "%s\n", __FUNCTION__);
1811 /* start with the driver above us */ 1810
1812 if (dev->driver) { 1811 BUG_ON(dev->driver);
1813 /* should have been done already by driver model core */
1814 WARN(dev, "pci remove, driver '%s' is still registered\n",
1815 dev->driver->driver.name);
1816 usb_gadget_unregister_driver(dev->driver);
1817 }
1818 1812
1819#ifdef CONFIG_USB_GADGET_DEBUG_FILES 1813#ifdef CONFIG_USB_GADGET_DEBUG_FILES
1820 remove_proc_entry(proc_node_name, NULL); 1814 remove_proc_entry(proc_node_name, NULL);