diff options
author | Fabio M. De Francesco <fmdefrancesco@gmail.com> | 2021-10-22 19:19:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-24 14:31:20 +0200 |
commit | 7e4c7947b42c4d9af0daa8d51dc58d4f17605dd9 (patch) | |
tree | 111f6e48cab80fcaa0aebeac919a846087bfa009 /drivers/staging/r8188eu/os_dep/xmit_linux.c | |
parent | 75c5e966bda45915b6e0a6549fa21b10f94ad215 (diff) |
staging: r8188eu: Use a Mutex instead of a binary Semaphore
Use a Mutex instead of a binary Semaphore for the purpose of enforcing
mutual exclusive access to the "pwrctrl_priv" structure.
Mutexes are sleeping locks similar to Semaphores with a 'count' of one
(like binary Semaphores), however they have a simpler interface, more
efficient performance, and additional constraints.
There is no change in the logic of the new code; however it is more
simple because it gets rid of four unnecessary wrappers:
_init_pwrlock(), _enter_pwrlock(),_exit_pwrlock(), _rtw_down_sema().
Actually, there is a change in the state in which the code waits for
acquiring locks, because it makes it in an uninterruptible state
(instead the old code used down_interruptibe()). Interruptible
waits are neither required nor wanted in this driver.
Tested with ASUSTek Computer, Inc. Realtek 8188EUS [USB-N10 Nano].
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20211022171917.24363-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu/os_dep/xmit_linux.c')
0 files changed, 0 insertions, 0 deletions