[3/3] staging: vchiq: make wait events interruptible
diff mbox series

Message ID 20190405113423.14495-4-nsaenzjulienne@suse.de
State New, archived
Headers show
Series
  • staging: vchiq: use interruptible waits
Related show

Commit Message

Nicolas Saenz Julienne April 5, 2019, 11:34 a.m. UTC
The killable version of wait_event() is meant to be used on situations
where it's not meant to fail at all costs, but still have the convenience
of being able to kill it if really necessary. For instance it's used
while waiting on an page write on some file systems.

Wait events in VCHIQ don't fit this criteria, as it's mainly used as an
interface to V4L2 and ALSA devices.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Wahren April 5, 2019, 12:46 p.m. UTC | #1
Am 05.04.19 um 13:34 schrieb Nicolas Saenz Julienne:
> The killable version of wait_event() is meant to be used on situations
> where it's not meant to fail at all costs, but still have the convenience
> of being able to kill it if really necessary. For instance it's used
> while waiting on an page write on some file systems.
>
> Wait events in VCHIQ don't fit this criteria, as it's mainly used as an
> interface to V4L2 and ALSA devices.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Shouldn't this have a Fixes tag?

Patch
diff mbox series

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 50189223f05b..41257a1df49d 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -431,7 +431,7 @@  remote_event_wait(wait_queue_head_t *wq, struct remote_event *event)
 	if (!event->fired) {
 		event->armed = 1;
 		dsb(sy);
-		if (wait_event_killable(*wq, event->fired)) {
+		if (wait_event_interruptible(*wq, event->fired)) {
 			event->armed = 0;
 			return 0;
 		}