drivers/staging/usbip: bugfix prevent driver unbind regression in linux-next
authorArjan Mels <arjan.mels@gmx.net>
Thu, 30 Jun 2011 20:18:18 +0000 (22:18 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jul 2011 03:14:10 +0000 (20:14 -0700)
Fix regression problem in linux-next: post_reset and pre_reset are no longer
included in linux-next while they are in linux-3.0rc5.

Signed-off-by: Arjan Mels <arjan.mels@gmx.net>
Cc: usbip-devel <usbip-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/usbip/stub_dev.c

index e26b2eede507ff83b1766de39dfe2e9484129093..fce22f2bd8bf5efd7a1e5e0c30689c506a8c09f9 100644 (file)
@@ -524,9 +524,28 @@ static void stub_disconnect(struct usb_interface *interface)
        }
 }
 
+/* 
+ * Presence of pre_reset and post_reset prevents the driver from being unbound
+ * when the device is being reset
+ */
+int stub_pre_reset(struct usb_interface *interface)
+{
+       dev_dbg(&interface->dev, "pre_reset\n");
+       return 0;
+}
+
+int stub_post_reset(struct usb_interface *interface)
+{
+       dev_dbg(&interface->dev, "post_reset\n");
+       return 0;
+}
+
 struct usb_driver stub_driver = {
        .name           = "usbip-host",
        .probe          = stub_probe,
        .disconnect     = stub_disconnect,
        .id_table       = stub_table,
-};
+       .pre_reset      = stub_pre_reset,
+       .post_reset     = stub_post_reset,
+ };