summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2014-05-26 19:23:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-28 00:04:10 +0200
commit4a8ee5059a241114c644350b6cb564c729a340fa (patch)
tree7f16ba87cb1a1a277055bca4579178395092b0b4 /drivers/usb/class
parentUSB: cdc-acm: minimise no-suspend window during shutdown (diff)
downloadlinux-4a8ee5059a241114c644350b6cb564c729a340fa.tar.xz
linux-4a8ee5059a241114c644350b6cb564c729a340fa.zip
USB: cdc-acm: do not update PM busy on read errors
There's no need to update the runtime PM last_busy field on read urb errors (e.g. when the urb is being killed on shutdown). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-acm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index f038f390db97..3c7cfac48e30 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -416,13 +416,15 @@ static void acm_read_bulk_callback(struct urb *urb)
dev_dbg(&acm->data->dev, "%s - disconnected\n", __func__);
return;
}
- usb_mark_last_busy(acm->dev);
if (urb->status) {
dev_dbg(&acm->data->dev, "%s - non-zero urb status: %d\n",
__func__, urb->status);
return;
}
+
+ usb_mark_last_busy(acm->dev);
+
acm_process_read_urb(acm, urb);
/* throttle device if requested by tty */