USB: fix leftover references to udev->autosuspend_delay
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 17 Nov 2010 15:56:01 +0000 (10:56 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 17 Nov 2010 21:24:47 +0000 (13:24 -0800)
This patch (as1436) takes care of leftover references to
udev->autosuspend_delay that didn't get removed during the earlier
conversion to the runtime-PM autosuspend API.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/tlg2300/pd-main.c
drivers/net/wimax/i2400m/usb.c
drivers/staging/bcm/InterfaceInit.c

index 4555f4a5f4c84b94f532d6993a5d0591e4569ae9..e33b428a8015408049213091432ec90d116e6a0e 100644 (file)
@@ -453,7 +453,8 @@ static int poseidon_probe(struct usb_interface *interface,
 
        device_init_wakeup(&udev->dev, 1);
 #ifdef CONFIG_PM
-       pd->udev->autosuspend_delay = HZ * PM_SUSPEND_DELAY;
+       pm_runtime_set_autosuspend_delay(&pd->udev->dev,
+                       1000 * PM_SUSPEND_DELAY);
        usb_enable_autosuspend(pd->udev);
 
        if (in_hibernation(pd)) {
index d3365ac85dde4639e455b35b65c805cdec1aa552..7cb375515e1e7180fb6bd1e30dc4833881d14b31 100644 (file)
@@ -514,7 +514,7 @@ int i2400mu_probe(struct usb_interface *iface,
 #ifdef CONFIG_PM
        iface->needs_remote_wakeup = 1;         /* autosuspend (15s delay) */
        device_init_wakeup(dev, 1);
-       usb_dev->autosuspend_delay = 15 * HZ;
+       pm_runtime_set_autosuspend_delay(&usb_dev->dev, 15000);
        usb_enable_autosuspend(usb_dev);
 #endif
 
index 824f9a45007aa8aebf65852ffb172e69eae95981..e97ad99b1bb48cdde08f11a861f21d0f409b9d6a 100644 (file)
@@ -277,7 +277,7 @@ usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id)
                if(psAdapter->bDoSuspend)
                {
 #ifdef CONFIG_PM
-                       udev->autosuspend_delay = 0;
+                       pm_runtime_set_autosuspend_delay(&udev->dev, 0);
                        intf->needs_remote_wakeup = 1;
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
                        udev->autosuspend_disabled = 0;