greybus: loopback: convert loopback wake/sleep to a waitqueue
Current code will incrementally poll for gb->type == 0 and sleep.
This type of polling strategy wastes cycles.
This patch changes the sleep strategy by introducing a wait-queue which
waits for gb->type != 0 or kthread_should_stop() to wake-up and work or
to wake-up and terminate.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
1 file changed
tree: 42459b2f73924da76a18e2c343934a519724070f
- drivers/