summaryrefslogtreecommitdiff
path: root/drivers/usb/core/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r--drivers/usb/core/driver.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index ebccdefcc6f2..2ea333a43d65 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -794,8 +794,6 @@ static int usb_suspend_device(struct usb_device *udev, pm_message_t msg)
done:
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
- if (status == 0)
- udev->dev.power.power_state.event = msg.event;
return status;
}
@@ -824,10 +822,8 @@ static int usb_resume_device(struct usb_device *udev)
done:
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
- if (status == 0) {
+ if (status == 0)
udev->autoresume_disabled = 0;
- udev->dev.power.power_state.event = PM_EVENT_ON;
- }
return status;
}
@@ -1180,8 +1176,7 @@ static int usb_resume_both(struct usb_device *udev)
}
} else {
- /* Needed for setting udev->dev.power.power_state.event,
- * for possible debugging message, and for reset_resume. */
+ /* Needed for reset-resume */
status = usb_resume_device(udev);
}
@@ -1194,7 +1189,8 @@ static int usb_resume_both(struct usb_device *udev)
done:
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
- udev->reset_resume = 0;
+ if (!status)
+ udev->reset_resume = 0;
return status;
}