summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/at91_udc.c
diff options
context:
space:
mode:
authorPatrik Sevallius <patrik.sevallius@enea.com>2007-11-20 09:32:00 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 14:34:52 -0800
commiteb0be47dbbdca133b1b94adc564297f25176b3ab (patch)
tree29b36900829961e7117706a43e4217fef64edee5 /drivers/usb/gadget/at91_udc.c
parent7b62cc86689e721f0aae87e88cb04ca841cf6c38 (diff)
downloadop-kernel-dev-eb0be47dbbdca133b1b94adc564297f25176b3ab.zip
op-kernel-dev-eb0be47dbbdca133b1b94adc564297f25176b3ab.tar.gz
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/at91_udc.c')
-rw-r--r--drivers/usb/gadget/at91_udc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index cd62b02..4b6ed35 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1616,6 +1616,8 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
local_irq_enable();
driver->unbind(&udc->gadget);
+ udc->gadget.dev.driver = NULL;
+ udc->gadget.dev.driver_data = NULL;
udc->driver = NULL;
DBG("unbound from %s\n", driver->driver.name);
OpenPOWER on IntegriCloud