aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/generic.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-09-10 11:31:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:55:26 -0400
commit5ad4f71e2f19a06f738463da1f09ea7fda3a3db2 (patch)
tree02c6b1413fdcb01e7086ae2dfb2b84796ce9b775 /drivers/usb/core/generic.c
parent7477120e34eef65a530cfb3fea5fe612c89669e5 (diff)
USB: move decision to ignore FREEZE events
This patch (as987) changes the way FREEZE and PRETHAW suspend events are handled in usbcore. The decision about whether or not to ignore them for non-root devices is pushed down into the USB-device driver, instead of being made in the core code. This is appropriate, since devices exported to a virtualized guest or over a network may indeed need to handle these types of suspend, even though normal devices don't. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/generic.c')
-rw-r--r--drivers/usb/core/generic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 9148b69785c..c1cb94e9f24 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -206,8 +206,13 @@ static int generic_suspend(struct usb_device *udev, pm_message_t msg)
206 */ 206 */
207 if (!udev->parent) 207 if (!udev->parent)
208 rc = hcd_bus_suspend(udev); 208 rc = hcd_bus_suspend(udev);
209
210 /* Non-root devices don't need to do anything for FREEZE or PRETHAW */
211 else if (msg.event == PM_EVENT_FREEZE || msg.event == PM_EVENT_PRETHAW)
212 rc = 0;
209 else 213 else
210 rc = usb_port_suspend(udev); 214 rc = usb_port_suspend(udev);
215
211 return rc; 216 return rc;
212} 217}
213 218