From: Ajay Kumar Gupta Date: Fri, 3 Jul 2009 07:48:45 +0000 (+0530) Subject: USB: otg: fix module reinsert issue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc7520c17982ca4232233d2781e5cde29e58fbad;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git USB: otg: fix module reinsert issue 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 Signed-off-by: Babu Ravi Acked-by: David Brownell --- diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c index 9ed5ea56867..af456b48985 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);