]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: add usbfs stubs for suspend and resume
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 4 Dec 2007 19:35:15 +0000 (14:35 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 22:34:54 +0000 (14:34 -0800)
This patch (as1022b) adds stub methods for suspend and resume to the
usbfs driver.  There isn't much they can do since there's no way to
inform a user task about the events.  But it's important to have the
stubs, because an upcoming change to usbcore will automatically unbind
drivers that don't have those methods when a suspend occurs.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c

index 85ec65ada123a5718d7ab1d889f4bd49c1e9d22c..32e5591ae7b17edce9cd4e142879d99b58422683 100644 (file)
@@ -402,10 +402,25 @@ static void driver_disconnect(struct usb_interface *intf)
        destroy_async_on_interface(ps, ifnum);
 }
 
+/* The following routines are merely placeholders.  There is no way
+ * to inform a user task about suspend or resumes.
+ */
+static int driver_suspend(struct usb_interface *intf, pm_message_t msg)
+{
+       return 0;
+}
+
+static int driver_resume(struct usb_interface *intf)
+{
+       return 0;
+}
+
 struct usb_driver usbfs_driver = {
        .name =         "usbfs",
        .probe =        driver_probe,
        .disconnect =   driver_disconnect,
+       .suspend =      driver_suspend,
+       .resume =       driver_resume,
 };
 
 static int claimintf(struct dev_state *ps, unsigned int ifnum)