aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-03-05 13:29:45 -0800
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-11-05 11:46:00 -0800
commitf571c8e55439cf8918e6b5bac11bf9f3d6737c8b (patch)
tree68120b5423e2261b7f55f660cb25cf9fab747e2e
parent6e2cab61ff64a5d82fec6529861edb6552be743b (diff)
usb: gadget: adb: allow freezing in adb_read
wait_event_interruptible in adb_read might return -ERESTARTSYS if userspace is frozen during adb_read or another signal is delivered to adb. If so, don't set dev->error to avoid resetting the adb connection. Change-Id: I5a7baa013a9a3a3b5305de7e6a0d18546a560018 Signed-off-by: Colin Cross <ccross@android.com>
-rw-r--r--drivers/usb/gadget/f_adb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_adb.c b/drivers/usb/gadget/f_adb.c
index 5415353ab2c1..4433a4dbdfb1 100644
--- a/drivers/usb/gadget/f_adb.c
+++ b/drivers/usb/gadget/f_adb.c
@@ -313,7 +313,8 @@ requeue_req:
/* wait for a request to complete */
ret = wait_event_interruptible(dev->read_wq, dev->rx_done);
if (ret < 0) {
- dev->error = 1;
+ if (ret != -ERESTARTSYS)
+ dev->error = 1;
r = ret;
usb_ep_dequeue(dev->ep_out, req);
goto done;