From patchwork Mon May 11 11:41:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kwangwoo Lee X-Patchwork-Id: 22937 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4BBfeb8026098 for ; Mon, 11 May 2009 11:41:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750841AbZEKLlg (ORCPT ); Mon, 11 May 2009 07:41:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752300AbZEKLlg (ORCPT ); Mon, 11 May 2009 07:41:36 -0400 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 Received: by wf-out-1314.google.com with SMTP id 26so2391674wfd.4 for ; Mon, 11 May 2009 04:41:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=HkvzVyb3uWdBc1h0zfRLdHa8oAkt9w+yqJ59iQIwq4c=; b=MoBYcLgjNMQ564PBAsrKVlSzmPJUBHDWm2BnsfYuXOGy80c1dI0qd+xf0W4ZrcWlA2 YCm4egGHhvbwynDP7Gt+wKBDLnFC1J6lf7eGfwrOn36r53C03Jwwfm+sBTBhMiGOB4Z0 LfuENvjdP22FelIT2pjek+6azujgl1ArmmFtg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=TU5AWQOIpdgTOYvdqL4i8icaJQOLLZxefTbBkB5RqQ9Y2BCOgb174hwZxy5DSaDfpN o4SopvlieTMzCC3sw83Y+q5NHNzXgfUdVE4rIsnL2t3CpQx7C0i94ah5BojUCpSnUTVb LYMA9mVG/6piHi/OvcnGgX1x+/fzTxNltTIsA= MIME-Version: 1.0 Received: by 10.142.246.19 with SMTP id t19mr3006159wfh.57.1242042095941; Mon, 11 May 2009 04:41:35 -0700 (PDT) Date: Mon, 11 May 2009 20:41:35 +0900 Message-ID: <483a38b80905110441t703adbd6sab31bcf19b507fc9@mail.gmail.com> Subject: [PATCH 1/2] Input: tsc2007: fix locking method against the current rc kernel From: Kwangwoo Lee To: Dmitry Torokhov , Thierry Reding Cc: Trilok Soni , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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;