if (padapter->pbuddy_adapter != NULL)
padapter->pbuddy_adapter->pbuddy_adapter = NULL;
+ mutex_destroy(&padapter->hw_init_mutex);
+
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_free_drv_sw\n"));
return _SUCCESS;
int ret;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
- _enter_critical_mutex(padapter->hw_init_mutex, NULL);
+ _enter_critical_mutex(&padapter->hw_init_mutex, NULL);
ret = _netdev_open(pnetdev);
- mutex_unlock(padapter->hw_init_mutex);
+ mutex_unlock(&padapter->hw_init_mutex);
return ret;
}
struct rtw_usb_drv {
struct usb_driver usbdrv;
int drv_registered;
- struct mutex hw_init_mutex;
};
static struct rtw_usb_drv rtl8188e_usb_drv = {
dvobj->if1 = padapter;
padapter->bDriverStopped = true;
- padapter->hw_init_mutex = &usb_drv->hw_init_mutex;
+ mutex_init(&padapter->hw_init_mutex);
padapter->chip_type = RTL8188E;
pnetdev = rtw_init_netdev(padapter);
DBG_88E(DRV_NAME " driver version=%s\n", DRIVERVERSION);
- mutex_init(&usb_drv->hw_init_mutex);
-
usb_drv->drv_registered = true;
return usb_register(&usb_drv->usbdrv);
}
usb_drv->drv_registered = false;
usb_deregister(&usb_drv->usbdrv);
- mutex_destroy(&usb_drv->hw_init_mutex);
DBG_88E("-rtw_drv_halt\n");
}