diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-02-10 01:26:32 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-02-10 01:26:32 -0500 |
commit | b22364c8eec89e6b0c081a237f3b6348df87796f (patch) | |
tree | 233a923281fb640106465d076997ff511efb6edf /drivers/usb/gadget/pxa2xx_udc.c | |
parent | 2c8dc071517ec2843869024dc82be2e246f41064 (diff) | |
parent | 66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/usb/gadget/pxa2xx_udc.c')
-rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 1ed506e95985..0d225369847d 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c | |||
@@ -56,7 +56,7 @@ | |||
56 | #include <asm/arch/pxa-regs.h> | 56 | #include <asm/arch/pxa-regs.h> |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #include <linux/usb_ch9.h> | 59 | #include <linux/usb/ch9.h> |
60 | #include <linux/usb_gadget.h> | 60 | #include <linux/usb_gadget.h> |
61 | 61 | ||
62 | #include <asm/arch/udc.h> | 62 | #include <asm/arch/udc.h> |
@@ -1623,7 +1623,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) | |||
1623 | if (!driver | 1623 | if (!driver |
1624 | || driver->speed < USB_SPEED_FULL | 1624 | || driver->speed < USB_SPEED_FULL |
1625 | || !driver->bind | 1625 | || !driver->bind |
1626 | || !driver->unbind | ||
1627 | || !driver->disconnect | 1626 | || !driver->disconnect |
1628 | || !driver->setup) | 1627 | || !driver->setup) |
1629 | return -EINVAL; | 1628 | return -EINVAL; |
@@ -1694,7 +1693,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) | |||
1694 | 1693 | ||
1695 | if (!dev) | 1694 | if (!dev) |
1696 | return -ENODEV; | 1695 | return -ENODEV; |
1697 | if (!driver || driver != dev->driver) | 1696 | if (!driver || driver != dev->driver || !driver->unbind) |
1698 | return -EINVAL; | 1697 | return -EINVAL; |
1699 | 1698 | ||
1700 | local_irq_disable(); | 1699 | local_irq_disable(); |
@@ -2638,9 +2637,11 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev) | |||
2638 | { | 2637 | { |
2639 | struct pxa2xx_udc *dev = platform_get_drvdata(pdev); | 2638 | struct pxa2xx_udc *dev = platform_get_drvdata(pdev); |
2640 | 2639 | ||
2640 | if (dev->driver) | ||
2641 | return -EBUSY; | ||
2642 | |||
2641 | udc_disable(dev); | 2643 | udc_disable(dev); |
2642 | remove_proc_files(); | 2644 | remove_proc_files(); |
2643 | usb_gadget_unregister_driver(dev->driver); | ||
2644 | 2645 | ||
2645 | if (dev->got_irq) { | 2646 | if (dev->got_irq) { |
2646 | free_irq(IRQ_USB, dev); | 2647 | free_irq(IRQ_USB, dev); |