linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: tsc2005: use relative jiffies to schedule the watchdog
@ 2011-03-21 17:07 Aaro Koskinen
  0 siblings, 0 replies; only message in thread
From: Aaro Koskinen @ 2011-03-21 17:07 UTC (permalink / raw)
  To: dmitry.torokhov, linux-input, linux-kernel; +Cc: Aaro Koskinen

Use relative jiffies to schedule the watchdog. Otherwise it will run
like a mad one.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 drivers/input/touchscreen/tsc2005.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c
index 3a15587..ea7f436 100644
--- a/drivers/input/touchscreen/tsc2005.c
+++ b/drivers/input/touchscreen/tsc2005.c
@@ -358,7 +358,7 @@ static void __tsc2005_enable(struct tsc2005 *ts)
 	if (ts->esd_timeout && ts->set_reset) {
 		ts->last_valid_interrupt = jiffies;
 		schedule_delayed_work(&ts->esd_work,
-				round_jiffies(jiffies +
+				round_jiffies_relative(
 					msecs_to_jiffies(ts->esd_timeout)));
 	}
 
@@ -518,7 +518,7 @@ static void tsc2005_esd_work(struct work_struct *work)
 out:
 	/* re-arm the watchdog */
 	schedule_delayed_work(&ts->esd_work,
-			      round_jiffies(jiffies +
+			      round_jiffies_relative(
 					msecs_to_jiffies(ts->esd_timeout)));
 	mutex_unlock(&ts->mutex);
 }
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-21 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-21 17:07 [PATCH] input: tsc2005: use relative jiffies to schedule the watchdog Aaro Koskinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).