[PATCH] usb: otg: fix module reinsert issue

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-usb@...>
Cc: <david-b@...>, <felipe.balbi@...>, Ajay Kumar Gupta <ajay.gupta@...>, Ravi, Babu <ravibabu@...>
Date: Friday, July 3, 2009 - 3:48 am

From: Ajay Kumar Gupta <ajay.gupta@ti.com>

Platform_device instance (pd) is not set to NULL in
usb_nop_xceiv_unregister() causing usb_nop_xceiv_register()
to fail during module reinsert.

Signed-off-by: Ravi, Babu <ravibabu@ti.com>
---
Submitting on behalf of Ravi Babu.

 drivers/usb/otg/nop-usb-xceiv.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index 9ed5ea5..af456b4 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -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);
 
-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] usb: otg: fix module reinsert issue, Ravi, Babu, (Fri Jul 3, 3:48 am)
Re: [PATCH] usb: otg: fix module reinsert issue, David Brownell, (Fri Jul 3, 11:27 am)