]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: encapsulate URB status checking
authorAlex Elder <elder@linaro.org>
Wed, 24 Sep 2014 10:16:13 +0000 (05:16 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 30 Sep 2014 01:00:10 +0000 (18:00 -0700)
commit877b1ee82e4eb5d0fa56ff5eef310c75556c8762
tree79bdfc8e3f0e3c6b6918b833ac136e419858693f
parentc41a36677365e6c5ad9e01ef50776052dfb6c0c5
greybus: encapsulate URB status checking

Define a new common function check_urb_status() that looks at the
status in a completed URB (containing incoming data) and issues
warnings in a consistent way.  It returns -EAGAIN to signal an
unrecognized status was seen, so the caller can ignore it and
re-post the URB to receive the next incoming data.  This
consolidates three blocks of code into one.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/es1-ap-usb.c