staging: rtl8188eu: Use unregistering flag from struct usb_interface
authornavin patidar <navin.patidar@gmail.com>
Sun, 1 Jun 2014 12:16:31 +0000 (17:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 22:30:02 +0000 (15:30 -0700)
Use unregistering flag from struct usb_interface to find
driver registration status.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index 523d5009baef5f836e3d6b5c3ea6ffe2b3579bc3..1841d543d3371bb0e6398fb0df84dfd18a16fbdc 100644 (file)
@@ -707,7 +707,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
        DBG_88E("+rtw_dev_remove\n");
        RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+dev_remove()\n"));
 
-       if (usb_drv->drv_registered)
+       if (!pusb_intf->unregistering)
                padapter->bSurpriseRemoved = true;
 
        rtw_pm_set_ips(padapter, IPS_NONE);