Commit fc8b5ae9 authored by navin patidar's avatar navin patidar Committed by Greg Kroah-Hartman

staging: rtl8188eu: Remove hw_init_mutex from struct rtw_usb_drv

Signed-off-by: default avatarnavin patidar <navin.patidar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fdc95374
......@@ -307,7 +307,7 @@ struct adapter {
#endif
struct adapter *pbuddy_adapter;
struct mutex *hw_init_mutex;
struct mutex hw_init_mutex;
spinlock_t br_ext_lock;
struct nat25_network_db_entry *nethash[NAT25_HASH_SIZE];
......
......@@ -997,6 +997,8 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
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;
......@@ -1105,9 +1107,9 @@ int netdev_open(struct net_device *pnetdev)
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;
}
......
......@@ -63,7 +63,6 @@ MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
struct rtw_usb_drv {
struct usb_driver usbdrv;
int drv_registered;
struct mutex hw_init_mutex;
};
static struct rtw_usb_drv rtl8188e_usb_drv = {
......@@ -537,7 +536,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
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);
......@@ -732,8 +731,6 @@ static int __init rtw_drv_entry(void)
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);
}
......@@ -746,7 +743,6 @@ static void __exit rtw_drv_halt(void)
usb_drv->drv_registered = false;
usb_deregister(&usb_drv->usbdrv);
mutex_destroy(&usb_drv->hw_init_mutex);
DBG_88E("-rtw_drv_halt\n");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment