From eb0be47dbbdca133b1b94adc564297f25176b3ab Mon Sep 17 00:00:00 2001 From: Patrik Sevallius Date: Tue, 20 Nov 2007 09:32:00 -0800 Subject: 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 [ Same bug was in other peripheral controller drivers; fixed ] Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/amd5536udc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb/gadget/amd5536udc.c') diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index 66e10da8a490..b663f23f2642 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c @@ -2038,6 +2038,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) spin_unlock_irqrestore(&dev->lock, flags); driver->unbind(&dev->gadget); + dev->gadget.dev.driver = NULL; dev->driver = NULL; /* set SD */ -- cgit v1.2.3