patch usb-suspend-resume-support-for-usbtmc.patch added to gregkh-2.6 tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Subject: USB: suspend/resume support for usbtmc

to my gregkh-2.6 tree.  Its filename is

    usb-suspend-resume-support-for-usbtmc.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From oliver@xxxxxxxxxx  Fri Jul 10 15:17:33 2009
From: Oliver Neukum <oliver@xxxxxxxxxx>
Date: Thu, 2 Jul 2009 11:44:33 +0200
Subject: USB: suspend/resume support for usbtmc
To: greg@xxxxxxxxx, USB list <linux-usb@xxxxxxxxxxxxxxx>
Message-ID: <200907021144.33515.oliver@xxxxxxxxxx>


a class driver should have suspend/resume. This makes sure we
don't see a virtual disconnect unnecessarily.

Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
 drivers/usb/class/usbtmc.c |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -1087,11 +1087,24 @@ static void usbtmc_disconnect(struct usb
 	kref_put(&data->kref, usbtmc_delete);
 }
 
+static int usbtmc_suspend (struct usb_interface *intf, pm_message_t message)
+{
+	/* this driver does not have pending URBs */
+	return 0;
+}
+
+static int usbtmc_resume (struct usb_interface *intf)
+{
+	return 0;
+}
+
 static struct usb_driver usbtmc_driver = {
 	.name		= "usbtmc",
 	.id_table	= usbtmc_devices,
 	.probe		= usbtmc_probe,
-	.disconnect	= usbtmc_disconnect
+	.disconnect	= usbtmc_disconnect,
+	.suspend	= usbtmc_suspend,
+	.resume		= usbtmc_resume,
 };
 
 static int __init usbtmc_init(void)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux