aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-04-01 01:04:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-01 15:32:43 -0400
commit505bdbc79d20f8f2a56c02498f079bb23b0ef756 (patch)
tree1d2fbe8bbe916bc0e78ae46124e93e8d83a1dc76 /drivers/usb/core
parent8e277d7cfae470b76eb955f6ee9aa32d111bf5ae (diff)
USB: driver.c: processing failure, maching resume condition with suspend condition
when suspend, it need check 'udev->actconfig'. so when process failure, also need check it. Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/driver.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 84d2b0585810..6eab440e1542 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1253,10 +1253,12 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
1253 1253
1254 /* If the suspend failed, resume interfaces that did get suspended */ 1254 /* If the suspend failed, resume interfaces that did get suspended */
1255 if (status != 0) { 1255 if (status != 0) {
1256 msg.event ^= (PM_EVENT_SUSPEND | PM_EVENT_RESUME); 1256 if (udev->actconfig) {
1257 while (++i < n) { 1257 msg.event ^= (PM_EVENT_SUSPEND | PM_EVENT_RESUME);
1258 intf = udev->actconfig->interface[i]; 1258 while (++i < n) {
1259 usb_resume_interface(udev, intf, msg, 0); 1259 intf = udev->actconfig->interface[i];
1260 usb_resume_interface(udev, intf, msg, 0);
1261 }
1260 } 1262 }
1261 1263
1262 /* If the suspend succeeded then prevent any more URB submissions 1264 /* If the suspend succeeded then prevent any more URB submissions