USB: otg: fix module reinsert issue
authorAjay Kumar Gupta <ajay.gupta@ti.com>
Fri, 3 Jul 2009 07:48:45 +0000 (13:18 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 12 Jul 2009 22:16:41 +0000 (15:16 -0700)
Platform_device instance (pd) is not set to NULL in
usb_nop_xceiv_unregister() causing usb_nop_xceiv_register()
to fail during module reinsert.

From: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Babu Ravi <ravibabu@ti.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
drivers/usb/otg/nop-usb-xceiv.c

index 9ed5ea5..af456b4 100644 (file)
@@ -53,6 +53,7 @@ EXPORT_SYMBOL(usb_nop_xceiv_register);
 void usb_nop_xceiv_unregister(void)
 {
        platform_device_unregister(pd);
+       pd = NULL;
 }
 EXPORT_SYMBOL(usb_nop_xceiv_unregister);