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>
This commit is contained in:
parent
8e277d7cfa
commit
505bdbc79d
|
@ -1253,10 +1253,12 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
|
||||||
|
|
||||||
/* If the suspend failed, resume interfaces that did get suspended */
|
/* If the suspend failed, resume interfaces that did get suspended */
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
msg.event ^= (PM_EVENT_SUSPEND | PM_EVENT_RESUME);
|
if (udev->actconfig) {
|
||||||
while (++i < n) {
|
msg.event ^= (PM_EVENT_SUSPEND | PM_EVENT_RESUME);
|
||||||
intf = udev->actconfig->interface[i];
|
while (++i < n) {
|
||||||
usb_resume_interface(udev, intf, msg, 0);
|
intf = udev->actconfig->interface[i];
|
||||||
|
usb_resume_interface(udev, intf, msg, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the suspend succeeded then prevent any more URB submissions
|
/* If the suspend succeeded then prevent any more URB submissions
|
||||||
|
|
Loading…
Reference in New Issue