linux/drivers/usb/gadget/legacy
Thomas Gleixner c1d51dd505 usb: gadget: Use completion interface instead of open coding it
ep_io() uses a completion on stack and open codes the waiting with:

  wait_event_interruptible (done.wait, done.done);
and
  wait_event (done.wait, done.done);

This waits in non-exclusive mode for complete(), but there is no reason to
do so because the completion can only be waited for by the task itself and
complete() wakes exactly one exlusive waiter.

Replace the open coded implementation with the corresponding
wait_for_completion*() functions.

No functional change.

Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lkml.kernel.org/r/20200321113241.043380271@linutronix.de
2020-03-21 16:00:20 +01:00
..
acm_ms.c
audio.c
cdc2.c usb: gadget: legacy: set max_speed to super-speed 2020-01-15 10:39:21 +01:00
dbgp.c
ether.c
g_ffs.c usb: gadget: legacy: set max_speed to super-speed 2020-01-15 10:39:21 +01:00
gmidi.c
hid.c
inode.c usb: gadget: Use completion interface instead of open coding it 2020-03-21 16:00:20 +01:00
Kconfig usb: gadget: move choice ... endchoice to legacy/Kconfig 2019-12-17 16:24:13 +01:00
Makefile
mass_storage.c usb: gadget: Remove set but not used variable 'opts' in msg_do_config 2019-10-22 10:39:04 +03:00
multi.c usb: gadget: legacy: set max_speed to super-speed 2020-01-15 10:39:21 +01:00
ncm.c usb: gadget: legacy: set max_speed to super-speed 2020-01-15 10:39:21 +01:00
nokia.c
printer.c
serial.c
tcm_usb_gadget.c
webcam.c
zero.c