summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/osdep_service.h
diff options
context:
space:
mode:
authorBinoy Jayan2016-08-22 06:39:42 +0200
committerGreg Kroah-Hartman2016-09-01 17:44:01 +0200
commit5c2ba8b85e350678b96db57cc8972deb9e47c497 (patch)
tree053419b13cedc5b4c9883c34375eceea59864d17 /drivers/staging/rtl8712/osdep_service.h
parentstaging: android: ion: ion.c fix parenthesis alignment (diff)
downloadkernel-qcow2-linux-5c2ba8b85e350678b96db57cc8972deb9e47c497.tar.gz
kernel-qcow2-linux-5c2ba8b85e350678b96db57cc8972deb9e47c497.tar.xz
kernel-qcow2-linux-5c2ba8b85e350678b96db57cc8972deb9e47c497.zip
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.h7
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)
{