diff options
author | Binoy Jayan <binoy.jayan@linaro.org> | 2016-06-01 14:56:55 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-21 18:22:31 +0200 |
commit | be10ceea4f0920975df35c23d50f8eed157ef72b (patch) | |
tree | d70a81ab209f834fda01063c46efc93d1e81b8b9 /drivers/staging/rtl8192e | |
parent | 5333496cb01ab216ba638976846531344bc3c4b9 (diff) | |
download | blackbird-obmc-linux-be10ceea4f0920975df35c23d50f8eed157ef72b.tar.gz blackbird-obmc-linux-be10ceea4f0920975df35c23d50f8eed157ef72b.zip |
rtl8192e: Replace semaphore scan_sem with mutex
The semaphore 'scan_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 513dd6153bd8..5bdc378aabc2 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1653,7 +1653,7 @@ struct rtllib_device { short proto_stoppping; struct mutex wx_mutex; - struct semaphore scan_sem; + struct mutex scan_mutex; struct semaphore ips_sem; spinlock_t mgmt_tx_lock; diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 901cc50a08d0..858eae20a53f 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -513,7 +513,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) ieee->be_scan_inprogress = true; - down(&ieee->scan_sem); + mutex_lock(&ieee->scan_mutex); while (1) { do { @@ -566,7 +566,7 @@ out: if (IS_DOT11D_ENABLE(ieee)) DOT11D_ScanComplete(ieee); } - up(&ieee->scan_sem); + mutex_unlock(&ieee->scan_mutex); ieee->be_scan_inprogress = false; @@ -587,7 +587,7 @@ static void rtllib_softmac_scan_wq(void *data) if (rtllib_act_scanning(ieee, true)) return; - down(&ieee->scan_sem); + mutex_lock(&ieee->scan_mutex); if (ieee->eRFPowerState == eRfOff) { netdev_info(ieee->dev, @@ -618,7 +618,7 @@ static void rtllib_softmac_scan_wq(void *data) schedule_delayed_work(&ieee->softmac_scan_wq, msecs_to_jiffies(RTLLIB_SOFTMAC_SCAN_TIME)); - up(&ieee->scan_sem); + mutex_unlock(&ieee->scan_mutex); return; out: @@ -630,7 +630,7 @@ out1: ieee->actscanning = false; ieee->scan_watch_dog = 0; ieee->scanning_continue = 0; - up(&ieee->scan_sem); + mutex_unlock(&ieee->scan_mutex); } @@ -683,7 +683,7 @@ EXPORT_SYMBOL(rtllib_start_send_beacons); static void rtllib_softmac_stop_scan(struct rtllib_device *ieee) { - down(&ieee->scan_sem); + mutex_lock(&ieee->scan_mutex); ieee->scan_watch_dog = 0; if (ieee->scanning_continue == 1) { ieee->scanning_continue = 0; @@ -692,7 +692,7 @@ static void rtllib_softmac_stop_scan(struct rtllib_device *ieee) cancel_delayed_work_sync(&ieee->softmac_scan_wq); } - up(&ieee->scan_sem); + mutex_unlock(&ieee->scan_mutex); } void rtllib_stop_scan(struct rtllib_device *ieee) @@ -3035,7 +3035,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee) ieee); mutex_init(&ieee->wx_mutex); - sema_init(&ieee->scan_sem, 1); + mutex_init(&ieee->scan_mutex); sema_init(&ieee->ips_sem, 1); spin_lock_init(&ieee->mgmt_tx_lock); |