rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex
authorBinoy Jayan <binoy.jayan@linaro.org>
Mon, 6 Jun 2016 04:38:06 +0000 (10:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 16:14:51 +0000 (18:14 +0200)
commitf18c566e4e1b9c95367d4f997c3c2d51a3559395
tree4b06b5d270f85272233e6a8c6ce083f8f641152a
parent16677cca770d659434aaa860f12d418b68adac31
rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex

The semaphore 'lock' in pwrctrl_priv is 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.
Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock,
_exit_pwrlock and _rtw_down_sema.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
drivers/staging/rtl8188eu/include/osdep_service.h
drivers/staging/rtl8188eu/include/rtw_event.h
drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
drivers/staging/rtl8188eu/os_dep/osdep_service.c
drivers/staging/rtl8188eu/os_dep/usb_intf.c