greybus: uart: wait for credits on shutdown
authorAxel Haslam <ahaslam@baylibre.com>
Tue, 31 May 2016 12:36:13 +0000 (14:36 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 1 Jun 2016 00:18:18 +0000 (17:18 -0700)
commit5dad5c314b686ca84aa5477462fcfd2b1abcba46
tree3078a86005e957ab329e07f27c917a00186d6d3e
parent2b3b87f056b276b688cb0429faf682cac33dbf7b
greybus: uart: wait for credits on shutdown

We should try to wait until all credits are accounted
for before returning from shutdown.

For this purpose add a helper function that will
wait on completion, and call it form the shutdown.
This helper will also be useful when "wait until sent" is
implemented.

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/uart.c