Commit 77eebe82 authored by Binoy Jayan's avatar Binoy Jayan Committed by Greg Kroah-Hartman

staging: wilc1000: Remove semaphore close_exit_sync

The semaphore 'close_exit_sync' does not serve any purpose other
than delaying the deregistration of the device which it is trying
to protect from shared access. 'up' is called only when a subdevice
is closed and not when it is opened. So, the semaphore count only
goes up when the device is used.
Signed-off-by: default avatarBinoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04247e7d
...@@ -31,8 +31,6 @@ static struct notifier_block g_dev_notifier = { ...@@ -31,8 +31,6 @@ static struct notifier_block g_dev_notifier = {
.notifier_call = dev_state_ev_handler .notifier_call = dev_state_ev_handler
}; };
static struct semaphore close_exit_sync;
static int wlan_deinit_locks(struct net_device *dev); static int wlan_deinit_locks(struct net_device *dev);
static void wlan_deinitialize_threads(struct net_device *dev); static void wlan_deinitialize_threads(struct net_device *dev);
...@@ -1088,7 +1086,6 @@ int wilc_mac_close(struct net_device *ndev) ...@@ -1088,7 +1086,6 @@ int wilc_mac_close(struct net_device *ndev)
WILC_WFI_deinit_mon_interface(); WILC_WFI_deinit_mon_interface();
} }
up(&close_exit_sync);
vif->mac_opened = 0; vif->mac_opened = 0;
return 0; return 0;
...@@ -1232,8 +1229,6 @@ void wilc_netdev_cleanup(struct wilc *wilc) ...@@ -1232,8 +1229,6 @@ void wilc_netdev_cleanup(struct wilc *wilc)
} }
if (wilc && (wilc->vif[0]->ndev || wilc->vif[1]->ndev)) { if (wilc && (wilc->vif[0]->ndev || wilc->vif[1]->ndev)) {
wilc_lock_timeout(wilc, &close_exit_sync, 5 * 1000);
for (i = 0; i < NUM_CONCURRENT_IFC; i++) for (i = 0; i < NUM_CONCURRENT_IFC; i++)
if (wilc->vif[i]->ndev) if (wilc->vif[i]->ndev)
if (vif[i]->mac_opened) if (vif[i]->mac_opened)
...@@ -1258,8 +1253,6 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type, ...@@ -1258,8 +1253,6 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
struct net_device *ndev; struct net_device *ndev;
struct wilc *wl; struct wilc *wl;
sema_init(&close_exit_sync, 0);
wl = kzalloc(sizeof(*wl), GFP_KERNEL); wl = kzalloc(sizeof(*wl), GFP_KERNEL);
if (!wl) if (!wl)
return -ENOMEM; return -ENOMEM;
......
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