From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kwangwoo Lee Subject: [PATCH 1/2] Input: tsc2007: fix locking method against the current rc kernel Date: Mon, 11 May 2009 20:41:35 +0900 Message-ID: <483a38b80905110441t703adbd6sab31bcf19b507fc9@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from wf-out-1314.google.com ([209.85.200.170]:64391 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841AbZEKLlf (ORCPT ); Mon, 11 May 2009 07:41:35 -0400 Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Dmitry Torokhov , Thierry Reding Cc: Trilok Soni , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Hi Dmitry, The following patch fixes bug in tsc2007. It is not working correctly in the current rc kernels. IMHO, this patch should go in the 2.6.30 Can you advise me about "From: email" part? I splited Thierry's patch. So the original "From: email" is followed: From: Thierry Reding Thank you, Kwangwoo Lee >>From 749ee3a4a2c2fe1f41601481e47cb26d8ccec20d Mon Sep 17 00:00:00 2001 From: Kwangwoo Lee Date: Mon, 11 May 2009 20:00:01 +0900 Subject: [PATCH 1/2] Input: tsc2007: fix locking method against the current rc kernel. Without this patch, current driver will emit panic message below: Kernel panic - not syncing: Fatal exception in interrupt. The original patch is written by Thierry. Signed-off-by: Thierry Reding Signed-off-by: Kwangwoo Lee --- drivers/input/touchscreen/tsc2007.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c index 536668f..948e167 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -200,8 +200,9 @@ static int tsc2007_read_values(struct tsc2007 *tsc) static enum hrtimer_restart tsc2007_timer(struct hrtimer *handle) { struct tsc2007 *ts = container_of(handle, struct tsc2007, timer); + unsigned long flags; - spin_lock_irq(&ts->lock); + spin_lock_irqsave(&ts->lock, flags); if (unlikely(!ts->get_pendown_state() && ts->pendown)) { struct input_dev *input = ts->input; @@ -222,7 +223,7 @@ static enum hrtimer_restart tsc2007_timer(struct hrtimer *handle) tsc2007_send_event(ts); } - spin_unlock_irq(&ts->lock); + spin_unlock_irqrestore(&ts->lock, flags); return HRTIMER_NORESTART; } -- 1.5.6.5