summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/goku_udc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-21 00:01:06 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-21 00:01:06 -0800
commitfb34d203d0b5ac1b8284973eb0db3fdff101fc5e (patch)
treed882cb10f1bb69f0058881df5dad6bd433cd28e5 /drivers/usb/gadget/goku_udc.c
parent5576d187a0eef3bb3c47500eaab33fb5485bc352 (diff)
parentc3052905033f8785bcb2c71d5ce40b84259e3a80 (diff)
downloadkernel-crypto-fb34d203d0b5ac1b8284973eb0db3fdff101fc5e.tar.gz
kernel-crypto-fb34d203d0b5ac1b8284973eb0db3fdff101fc5e.tar.xz
kernel-crypto-fb34d203d0b5ac1b8284973eb0db3fdff101fc5e.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (34 commits) USB Storage: remove duplicate Nokia entry in unusual_devs.h [PATCH] bluetooth: add support for another Kensington dongle [PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems [PATCH] USB: Nokia E70 is an unusual device USB: fix to usbfs_snoop logging of user defined control urbs USB: at91_udc: Additional checks USB: at91_udc: Cleanup variables after failure in usb_gadget_register_driver() USB: at91_udc: allow drivers that support high speed USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card USB: at91_udc, misc fixes USB: at91 udc, support at91sam926x addresses USB: OHCI support for PNX8550 USB: ohci handles hardware faults during root port resets USB: ohci at91 warning fix USB: ohci whitespace/comment fixups USB: MAINTAINERS update, EHCI and OHCI USB: gadget driver unbind() is optional; section fixes; misc UHCI: module parameter to ignore overcurrent changes USB: Nokia E70 is an unusual device USB AUERSWALD: replace kmalloc+memset with kzalloc ...
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 805a9826842..d0ef1d6b3fa 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)
if (!driver
|| driver->speed != USB_SPEED_FULL
|| !driver->bind
- || !driver->unbind
|| !driver->disconnect
|| !driver->setup)
return -EINVAL;
@@ -1495,7 +1494,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
if (!dev)
return -ENODEV;
- if (!driver || driver != dev->driver)
+ if (!driver || driver != dev->driver || !driver->unbind)
return -EINVAL;
spin_lock_irqsave(&dev->lock, flags);
@@ -1808,13 +1807,8 @@ static void goku_remove(struct pci_dev *pdev)
struct goku_udc *dev = pci_get_drvdata(pdev);
DBG(dev, "%s\n", __FUNCTION__);
- /* start with the driver above us */
- if (dev->driver) {
- /* should have been done already by driver model core */
- WARN(dev, "pci remove, driver '%s' is still registered\n",
- dev->driver->driver.name);
- usb_gadget_unregister_driver(dev->driver);
- }
+
+ BUG_ON(dev->driver);
#ifdef CONFIG_USB_GADGET_DEBUG_FILES
remove_proc_entry(proc_node_name, NULL);