diff options
author | Patrik Sevallius <patrik.sevallius@enea.com> | 2007-11-20 12:32:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 17:34:52 -0500 |
commit | eb0be47dbbdca133b1b94adc564297f25176b3ab (patch) | |
tree | 29b36900829961e7117706a43e4217fef64edee5 /drivers/usb/gadget/lh7a40x_udc.c | |
parent | 7b62cc86689e721f0aae87e88cb04ca841cf6c38 (diff) |
USB: usb peripheral controller driver oops avoidance
I'm having problem with oopses when rebooting, if I modprobe g_serial
and rmmod g_serial and do a reboot I get an oops in device_shutdown().
The reason seems to be that usb_gadget_unregister_driver() doesn't do
enough cleanup. With this at91_udc patch I don't get the oops.
Signed-off-by: Patrik Sevallius <patrik.sevallius@enea.com>
[ Same bug was in other peripheral controller drivers; fixed ]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/lh7a40x_udc.c')
-rw-r--r-- | drivers/usb/gadget/lh7a40x_udc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 367b75c0b25b..37243ef7104e 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c | |||
@@ -474,6 +474,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) | |||
474 | spin_unlock_irqrestore(&dev->lock, flags); | 474 | spin_unlock_irqrestore(&dev->lock, flags); |
475 | 475 | ||
476 | driver->unbind(&dev->gadget); | 476 | driver->unbind(&dev->gadget); |
477 | dev->gadget.dev.driver = NULL; | ||
477 | device_del(&dev->gadget.dev); | 478 | device_del(&dev->gadget.dev); |
478 | 479 | ||
479 | udc_disable(dev); | 480 | udc_disable(dev); |