aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/core/driver.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-03-13 16:39:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 13:28:35 -0700
commiteaafbc3a8adab16babe2c20e54ad3ba40d1fbbc9 (patch)
treefea84341faf742efe8beeaff03ec94b687b7b26f /drivers/usb/core/driver.c
parent6b157c9bf3bace6eeb4a973da63923ef24995cce (diff)
USB: Allow autosuspend delay to equal 0
This patch (as867) adds an entry for the new power/autosuspend attribute in Documentation/ABI/testing, and it changes the behavior of the delay value. Now a delay of 0 means to autosuspend as soon as possible, and negative values will prevent autosuspend. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r--drivers/usb/core/driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index abea48de876..884179f1e16 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -970,7 +970,7 @@ static int autosuspend_check(struct usb_device *udev)
udev->do_remote_wakeup = device_may_wakeup(&udev->dev);
if (udev->pm_usage_cnt > 0)
return -EBUSY;
- if (!udev->autosuspend_delay)
+ if (udev->autosuspend_delay < 0)
return -EPERM;
if (udev->actconfig) {