From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Dmitry Torokhov <dtor@mail.ru>, Jiri Kosina <jkosina@suse.cz>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 1/3] wm97xx-core: Only schedule interrupt handler if not already scheduled
Date: Mon, 14 Apr 2008 18:39:33 +0100 [thread overview]
Message-ID: <1208194775-4293-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20080414173841.GA2213@rakim.wolfsonmicro.main>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/input/touchscreen/wm97xx-core.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index 2910999..e27b1e0 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -328,18 +328,18 @@ static void wm97xx_pen_irq_worker(struct work_struct *work)
*
* We have to disable the codec interrupt in the handler because it
* can take upto 1ms to clear the interrupt source. We schedule a task
- * in a work queue to do the actual interaction with the chip (it
- * doesn't matter if we end up reenqueing it before it is executed
- * since we don't touch the chip until it has run). The interrupt is
- * then enabled again in the slow handler when the source has been
- * cleared.
+ * in a work queue to do the actual interaction with the chip. The
+ * interrupt is then enabled again in the slow handler when the source
+ * has been cleared.
*/
static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id)
{
struct wm97xx *wm = dev_id;
- wm->mach_ops->irq_enable(wm, 0);
- queue_work(wm->ts_workq, &wm->pen_event_work);
+ if (!work_pending(&wm->pen_event_work)) {
+ wm->mach_ops->irq_enable(wm, 0);
+ queue_work(wm->ts_workq, &wm->pen_event_work);
+ }
return IRQ_HANDLED;
}
--
1.5.5
next prev parent reply other threads:[~2008-04-14 17:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-14 17:38 WM97xx touchscreen updates Mark Brown
2008-04-14 17:39 ` Mark Brown [this message]
2008-04-14 17:39 ` [PATCH 2/3] wm97xx-core: Use IRQF_SAMPLE_RANDOM Mark Brown
2008-04-14 17:39 ` [PATCH 3/3] wm97xx-core: Support use as a wakeup source Mark Brown
2008-04-14 20:34 ` Dmitry Torokhov
2008-04-15 0:29 ` David Brownell
2008-04-15 12:18 ` Mark Brown
2008-04-14 18:10 ` [PATCH 1/3] wm97xx-core: Only schedule interrupt handler if not already scheduled Dmitry Torokhov
2008-04-15 8:48 ` Mark Brown
2008-04-15 13:02 ` Dmitry Torokhov
2008-04-15 14:42 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2008-04-15 14:45 WM97xx touchscreen updates Mark Brown
2008-04-15 14:47 ` [PATCH 1/3] wm97xx-core: Only schedule interrupt handler if not already scheduled Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1208194775-4293-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=akpm@linux-foundation.org \
--cc=dtor@mail.ru \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).