THis patch (as1022) adds stub methods for suspend/resume/reset_resume
and pre-rreset/post-reset to the usbfs_driver. There isn't much they
can do, since there's no way to inform a user task about any of these
events. But it's important to have the stubs, because an upcoming
change to usbcore will automatically unbind drivers that don't have
these methods.
Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
---
Index: usb-2.6/drivers/usb/core/devio.c
===================================================================
--- usb-2.6.orig/drivers/usb/core/devio.c
+++ usb-2.6/drivers/usb/core/devio.c
@@ -402,10 +402,43 @@ static void driver_disconnect(struct usb
destroy_async_on_interface(ps, ifnum);
}
+/* The following routines are merely placeholders. There is no way
+ * to inform a user task about resets, suspend/resume, or unbind events.
+ */
+static int driver_suspend(struct usb_interface *intf, pm_message_t msg)
+{
+ return 0;
+}
+
+static int driver_resume(struct usb_interface *intf)
+{
+ return 0;
+}
+
+static int driver_reset_resume(struct usb_interface *intf)
+{
+ return 0;
+}
+
+static int driver_pre_reset(struct usb_interface *intf)
+{
+ return 0;
+}
+
+static int driver_post_reset(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,
+ .reset_resume = driver_reset_resume,
+ .pre_reset = driver_pre_reset,
+ .post_reset = driver_post_reset,
};
static int claimintf(struct dev_state *ps, unsigned int ifnum)
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[Home]
[Video for Linux]
[Photo]
[Yosemite Forum]
[Yosemite Photos]
[Video Projectors]
[PDAs]
[Hacking TiVo]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Big List of Linux Books]
[Free Dating]