diff options
author | Binoy Jayan <binoy.jayan@linaro.org> | 2016-06-06 04:38:06 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-21 16:14:51 (GMT) |
commit | f18c566e4e1b9c95367d4f997c3c2d51a3559395 (patch) | |
tree | 4b06b5d270f85272233e6a8c6ce083f8f641152a /drivers/staging/rtl8188eu/include/osdep_service.h | |
parent | 16677cca770d659434aaa860f12d418b68adac31 (diff) | |
download | linux-f18c566e4e1b9c95367d4f997c3c2d51a3559395.tar.xz |
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>
Diffstat (limited to 'drivers/staging/rtl8188eu/include/osdep_service.h')
-rw-r--r-- | drivers/staging/rtl8188eu/include/osdep_service.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 5475956..c53c9ea 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -36,6 +36,7 @@ #include <linux/atomic.h> #include <linux/io.h> #include <linux/semaphore.h> +#include <linux/mutex.h> #include <linux/sem.h> #include <linux/sched.h> #include <linux/etherdevice.h> @@ -78,8 +79,6 @@ u8 *_rtw_malloc(u32 sz); void *rtw_malloc2d(int h, int w, int size); -u32 _rtw_down_sema(struct semaphore *sema); - void _rtw_init_queue(struct __queue *pqueue); struct rtw_netdev_priv_indicator { |