From patchwork Mon Mar 21 17:07:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Koskinen, Aaro (Nokia - FI/Espoo)" X-Patchwork-Id: 648371 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2LHAdlJ030345 for ; Mon, 21 Mar 2011 17:10:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752557Ab1CURKj (ORCPT ); Mon, 21 Mar 2011 13:10:39 -0400 Received: from smtp.nokia.com ([147.243.128.24]:38505 "EHLO mgw-da01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752220Ab1CURKi (ORCPT ); Mon, 21 Mar 2011 13:10:38 -0400 Received: from nokia.com (localhost [127.0.0.1]) by mgw-da01.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id p2LHAXgw031472; Mon, 21 Mar 2011 19:10:34 +0200 Received: from localhost.localdomain ([helruo-dhcp02150.ntc.nokia.com [172.21.21.50]]) by mgw-da01.nokia.com with RELAY id p2LHAFvi031326 ; Mon, 21 Mar 2011 19:10:18 +0200 From: Aaro Koskinen To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Aaro Koskinen Subject: [PATCH] input: tsc2005: use relative jiffies to schedule the watchdog Date: Mon, 21 Mar 2011 19:07:51 +0200 Message-Id: <1300727271-20120-1-git-send-email-aaro.koskinen@nokia.com> X-Mailer: git-send-email 1.5.6.5 X-Nokia-AV: Clean Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 21 Mar 2011 17:10:40 +0000 (UTC) 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); }