OSDN Git Service

drm/udl: Replace semaphore with a simple wait queue
authorTakashi Iwai <tiwai@suse.de>
Thu, 4 Aug 2022 07:58:23 +0000 (09:58 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 10 Aug 2022 08:06:20 +0000 (10:06 +0200)
commitacd45c56790a3b558b0b0081678a20b0a0d89b0f
tree8a9a3c72e96d8f932c7fe3d0b72383eafa518323
parent504a51d70f86e3b989ca8834691bbac4033b6f48
drm/udl: Replace semaphore with a simple wait queue

UDL driver uses a semaphore for controlling the emptiness of FIFO in a
slightly funky way.  This patch replaces it with a wait queue and
controls the emptiness with the standard wait_event*() macro instead,
which is a more straightforward implementation.

While we are at it, drop the dead code for delayed semaphore down,
too.

Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220804075826.27036-2-tiwai@suse.de
drivers/gpu/drm/udl/udl_drv.h
drivers/gpu/drm/udl/udl_main.c