]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: gpib: Replace semaphore with completion for one-time signaling
authorSantosh Mahto <eisantosh95@gmail.com>
Thu, 12 Dec 2024 16:21:04 +0000 (21:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2024 15:54:15 +0000 (16:54 +0100)
commit5d4db9cf4135d82634c7f31aac73081fba3a356e
tree36fdf9b840d28a613ed89ef9d9a0183b0f060502
parent716eefc88c2f784ef16395d6a3eea8670847bba4
staging: gpib: Replace semaphore with completion for one-time signaling

Replaced 'down_interruptible()' and 'up()' calls
with 'wait_for_completion_interruptible()' and
'complete()' respectively. The completion API
simplifies the code and adheres to kernel best
practices for synchronization primitive

Signed-off-by: Santosh Mahto <eisantosh95@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20241212162112.13083-1-eisantosh95@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/ni_usb/ni_usb_gpib.c
drivers/staging/gpib/ni_usb/ni_usb_gpib.h