diff options
author | Binoy Jayan <binoy.jayan@linaro.org> | 2016-08-22 07:39:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-01 18:44:01 +0300 |
commit | 5c2ba8b85e350678b96db57cc8972deb9e47c497 (patch) | |
tree | 053419b13cedc5b4c9883c34375eceea59864d17 /drivers/staging/rtl8712/osdep_service.h | |
parent | b2bcdadcf926c6048553530b00826018c2f39481 (diff) | |
download | linux-5c2ba8b85e350678b96db57cc8972deb9e47c497.tar.xz |
rtl8712: pwrctrl_priv: Replace semaphore lock with mutex
The semaphore 'lock' in 'pwrctrl_priv' is used as a simple mutex, so it
should be written as one. Semaphores are going away in the future.
_enter_pwrlock was using down_interruptible(), so the lock could be broken
by sending a signal. This could be a bug, because nothing checks the return
code here. Hence, using mutex_lock instead of the interruptible version.
Removing the now unused _enter_pwrlock and _down_sema.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/osdep_service.h')
-rw-r--r-- | drivers/staging/rtl8712/osdep_service.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h index ad041c96fdb8..c9ea50daffff 100644 --- a/drivers/staging/rtl8712/osdep_service.h +++ b/drivers/staging/rtl8712/osdep_service.h @@ -57,13 +57,6 @@ struct __queue { spin_lock_init(&((pqueue)->lock)); \ } while (0) -static inline u32 _down_sema(struct semaphore *sema) -{ - if (down_interruptible(sema)) - return _FAIL; - return _SUCCESS; -} - static inline u32 end_of_queue_search(struct list_head *head, struct list_head *plist) { |