[PATCH] USB: remove leftover references to udev->autosuspend_disabled

Previous thread: Re: [PATCH linux-next v2 1/2] irq: Add CPU mask affinity hint by Peter P Waskiewicz Jr on Friday, April 30, 2010 - 11:02 am. (3 messages)

Next thread: Re: [ANNOUNCE] linux-2.6.32.y-drm33.z by Luis R. Rodriguez on Thursday, April 29, 2010 - 10:12 am. (1 message)
From: Alan Stern
Date: Friday, April 30, 2010 - 9:14 am

This patch (as1373) fixes a couple of drivers outside the USB
subtree.  Devices are now disabled or enabled for autosuspend by
calling a core function instead of setting a flag.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

---


Here's the fix.  I haven't compile-tested it, but the changes are
pretty simple.

Alan Stern


Index: usb-2.6/drivers/media/video/tlg2300/pd-main.c
===================================================================
--- usb-2.6.orig/drivers/media/video/tlg2300/pd-main.c
+++ usb-2.6/drivers/media/video/tlg2300/pd-main.c
@@ -455,8 +455,8 @@ static int poseidon_probe(struct usb_int
 
 	device_init_wakeup(&udev->dev, 1);
 #ifdef CONFIG_PM
-	pd->udev->autosuspend_disabled = 0;
 	pd->udev->autosuspend_delay = HZ * PM_SUSPEND_DELAY;
+	usb_enable_autosuspend(pd->udev);
 
 	if (in_hibernation(pd)) {
 		INIT_WORK(&pd->pm_work, hibernation_resume);
Index: usb-2.6/drivers/net/wimax/i2400m/usb.c
===================================================================
--- usb-2.6.orig/drivers/net/wimax/i2400m/usb.c
+++ usb-2.6/drivers/net/wimax/i2400m/usb.c
@@ -505,7 +505,7 @@ int i2400mu_probe(struct usb_interface *
 	iface->needs_remote_wakeup = 1;		/* autosuspend (15s delay) */
 	device_init_wakeup(dev, 1);
 	usb_dev->autosuspend_delay = 15 * HZ;
-	usb_dev->autosuspend_disabled = 0;
+	usb_enable_autosuspend(usb_dev);
 #endif
 
 	result = i2400m_setup(i2400m, I2400M_BRI_MAC_REINIT);

--

Previous thread: Re: [PATCH linux-next v2 1/2] irq: Add CPU mask affinity hint by Peter P Waskiewicz Jr on Friday, April 30, 2010 - 11:02 am. (3 messages)

Next thread: Re: [ANNOUNCE] linux-2.6.32.y-drm33.z by Luis R. Rodriguez on Thursday, April 29, 2010 - 10:12 am. (1 message)