]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
USB: Make usb-autosuspend timer 1 sec jiffy aligned
authorVenki Pallipadi <venkatesh.pallipadi@intel.com>
Mon, 9 Jul 2007 19:03:06 +0000 (12:03 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Jul 2007 23:34:40 +0000 (16:34 -0700)
Make usb autosuspend timers 1sec jiffy aligned.

This helps to reduce the frequency at which the CPU must be taken out of a
lower-power state.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c

index a3aed8d87ddc8dfc66168588b1e3f719ba965b24..73c49362cd47c7d593e815d7bd3f9f194d899ff3 100644 (file)
@@ -1010,7 +1010,7 @@ static int autosuspend_check(struct usb_device *udev)
                         * or for the past.
                         */
                        queue_delayed_work(ksuspend_usb_wq, &udev->autosuspend,
-                                       suspend_time - jiffies);
+                               round_jiffies_relative(suspend_time - jiffies));
                        }
                return -EAGAIN;
        }