diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-11-25 16:40:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 10:00:03 -0800 |
commit | 4ec06d629628b6e5c7ff50d349a26ef5c35696e3 (patch) | |
tree | 7522699505b78d2886b3428c7170f2b0fd23a62b /drivers/usb | |
parent | 3cb22d658668234edbe6dcb165501e9ef0c0a059 (diff) | |
download | blackbird-op-linux-4ec06d629628b6e5c7ff50d349a26ef5c35696e3.tar.gz blackbird-op-linux-4ec06d629628b6e5c7ff50d349a26ef5c35696e3.zip |
USB: utilize round_jiffies_up_relative()
This patch (as1178) uses the new round_jiffies_up_relative() routine
for setting the autosuspend delayed_work timer. It's appropriate
since we don't care too much about the exact length of the delay, but
we don't want it to be too short (rounded down).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 7e26fb3c2759..0226e019326a 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1111,7 +1111,7 @@ static int autosuspend_check(struct usb_device *udev, int reschedule) if (reschedule) { if (!timer_pending(&udev->autosuspend.timer)) { queue_delayed_work(ksuspend_usb_wq, &udev->autosuspend, - round_jiffies_relative(suspend_time - j)); + round_jiffies_up_relative(suspend_time - j)); } return -EAGAIN; } @@ -1553,7 +1553,7 @@ void usb_autopm_put_interface_async(struct usb_interface *intf) else if (intf->pm_usage_cnt <= 0 && !timer_pending(&udev->autosuspend.timer)) { queue_delayed_work(ksuspend_usb_wq, &udev->autosuspend, - round_jiffies_relative( + round_jiffies_up_relative( udev->autosuspend_delay)); } } |