rtl8712: pwrctrl_priv: Replace semaphore lock with mutex
authorBinoy Jayan <binoy.jayan@linaro.org>
Mon, 22 Aug 2016 04:39:42 +0000 (10:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 15:44:01 +0000 (17:44 +0200)
commit5c2ba8b85e350678b96db57cc8972deb9e47c497
tree053419b13cedc5b4c9883c34375eceea59864d17
parentb2bcdadcf926c6048553530b00826018c2f39481
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>
drivers/staging/rtl8712/osdep_service.h
drivers/staging/rtl8712/rtl8712_cmd.c
drivers/staging/rtl8712/rtl871x_pwrctrl.c
drivers/staging/rtl8712/rtl871x_pwrctrl.h