aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/input-polldev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/input-polldev.c')
-rw-r--r--drivers/input/input-polldev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c
index b773d4c756a6..92b359894e81 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)
70{ 70{
71 struct input_polled_dev *dev = input->private; 71 struct input_polled_dev *dev = input->private;
72 int error; 72 int error;
73 unsigned long ticks;
73 74
74 error = input_polldev_start_workqueue(); 75 error = input_polldev_start_workqueue();
75 if (error) 76 if (error)
@@ -78,8 +79,10 @@ static int input_open_polled_device(struct input_dev *input)
78 if (dev->flush) 79 if (dev->flush)
79 dev->flush(dev); 80 dev->flush(dev);
80 81
81 queue_delayed_work(polldev_wq, &dev->work, 82 ticks = msecs_to_jiffies(dev->poll_interval);
82 msecs_to_jiffies(dev->poll_interval)); 83 if (ticks >= HZ)
84 ticks = round_jiffies(ticks);
85 queue_delayed_work(polldev_wq, &dev->work, ticks);
83 86
84 return 0; 87 return 0;
85} 88}