Hi,

could you please get in touch with me about testing this patch implementing
autosuspend for the fingerprint function of devices driven by the idmouse 
driver?

        Regards
                Oliver

----

--- linux-2.6.24-ser/drivers/usb/misc/idmouse.c.alt     2008-01-30 
17:35:17.000000000 +0100
+++ linux-2.6.24-ser/drivers/usb/misc/idmouse.c 2008-01-30 17:35:22.000000000 
+0100
@@ -97,6 +97,16 @@ static int idmouse_probe(struct usb_inte
 
 static void idmouse_disconnect(struct usb_interface *interface);
 
+static int idmouse_suspend(struct usb_interface *intf, pm_message_t message)
+{
+       return 0;
+}
+
+static int idmouse_resume (struct usb_interface *intf)
+{
+       return 0;
+}
+
 /* file operation pointers */
 static const struct file_operations idmouse_fops = {
        .owner = THIS_MODULE,
@@ -117,7 +127,10 @@ static struct usb_driver idmouse_driver 
        .name = DRIVER_SHORT,
        .probe = idmouse_probe,
        .disconnect = idmouse_disconnect,
+       .suspend = idmouse_suspend,
+       .resume = idmouse_resume,
        .id_table = idmouse_table,
+       .supports_autosuspend = 1,
 };
 
 static int idmouse_create_image(struct usb_idmouse *dev)
@@ -234,8 +247,12 @@ static int idmouse_open(struct inode *in
 
        } else {
 
+               result = usb_autopm_get_interface(dev->interface);
+               if (result < 0)
+                       goto error;
                /* create a new image and check for success */
                result = idmouse_create_image (dev);
+               usb_autopm_put_interface(dev->interface);
                if (result)
                        goto error;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to