Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=14134b31ae646220a5a451e38aae1dd023d457cb Commit: 14134b31ae646220a5a451e38aae1dd023d457cb Parent: e15b02138b89d7bc053817e6f7601e92e29d371c Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Wed Sep 26 00:01:25 2007 -0400 Committer: Dmitry Torokhov <[EMAIL PROTECTED]> CommitDate: Wed Sep 26 00:01:25 2007 -0400
Input: polled device power saving For slow running polling, it saves power to align wakeups on tick boundary. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]> --- drivers/input/input-polldev.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index b773d4c..92b3598 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c @@ -70,6 +70,7 @@ static int input_open_polled_device(struct input_dev *input) { struct input_polled_dev *dev = input->private; int error; + unsigned long ticks; error = input_polldev_start_workqueue(); if (error) @@ -78,8 +79,10 @@ static int input_open_polled_device(struct input_dev *input) if (dev->flush) dev->flush(dev); - queue_delayed_work(polldev_wq, &dev->work, - msecs_to_jiffies(dev->poll_interval)); + ticks = msecs_to_jiffies(dev->poll_interval); + if (ticks >= HZ) + ticks = round_jiffies(ticks); + queue_delayed_work(polldev_wq, &dev->work, ticks); return 0; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html