]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: greybus: loopback: use gb_loopback_async_wait_all don't spin
authorBryan O'Donoghue <pure.logic@nexus-software.ie>
Thu, 22 Dec 2016 00:37:28 +0000 (00:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jan 2017 15:45:01 +0000 (16:45 +0100)
commita072a72da96f8fedda3312686456c18c34ca179a
tree67340f7d94d4814d46d4823756dba17d54cade99
parentaf1550cce0b55a9c6fa37a84301bd893bdf6997e
staging: greybus: loopback: use gb_loopback_async_wait_all don't spin

Currently the greybus-loopback thread logic spins around waiting for
send_count == iteration_max which on real hardware doesn't make a
difference to us but in simulation is excruciatingly slow, anti-social and
bad manners. Use the existing gb_loopback_async_wait_all() function to gate
continuing when the send_count == iteration_max and go to sleep until
there's something worthwhile to-do.

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/loopback.c