diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-03-21 12:25:48 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-03-21 16:00:20 +0100 |
commit | 9fe114ce0371223d2a0490f0aa52b8f108d92f37 (patch) | |
tree | c2066837ce37b0392f56c82642b4830919e98b33 /include/acpi/pdc_intel.h | |
parent | usb: gadget: Use completion interface instead of open coding it (diff) | |
download | linux-9fe114ce0371223d2a0490f0aa52b8f108d92f37.tar.xz linux-9fe114ce0371223d2a0490f0aa52b8f108d92f37.zip |
orinoco_usb: Use the regular completion interfaces
The completion usage in this driver is interesting:
- it uses a magic complete function which according to the comment was
implemented by invoking complete() four times in a row because
complete_all() was not exported at that time.
- it uses an open coded wait/poll which checks completion:done. Only one wait
side (device removal) uses the regular wait_for_completion() interface.
The rationale behind this is to prevent that wait_for_completion() consumes
completion::done which would prevent that all waiters are woken. This is not
necessary with complete_all() as that sets completion::done to UINT_MAX which
is left unmodified by the woken waiters.
Replace the magic complete function with complete_all() and convert the
open coded wait/poll to regular completion interfaces.
This changes the wait to exclusive wait mode. But that does not make any
difference because the wakers use complete_all() which ignores the
exclusive mode.
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.150783464@linutronix.de
Diffstat (limited to 'include/acpi/pdc_intel.h')
0 files changed, 0 insertions, 0 deletions