From: "Hans J. Koch" <hjk@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: dmitry.torokhov@gmail.com, nico@cam.org
Subject: [PATCH] trivial: ucb1400_ts: Fix a misleading function name
Date: Thu, 9 Jul 2009 16:46:21 +0200 [thread overview]
Message-ID: <20090709144620.GC3646@local> (raw)
The driver for UCB1400 touchscreen controllers contains a function named
ucb1400_ts_pen_down(), but it returns 0 if the pen is down and 1 if it's up.
This causes confusion, especially since it's used as a boolean truth value
later in the code. This patch renames it.
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
---
drivers/input/touchscreen/ucb1400_ts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.31-rc/drivers/input/touchscreen/ucb1400_ts.c
===================================================================
--- linux-2.6.31-rc.orig/drivers/input/touchscreen/ucb1400_ts.c 2009-07-09 14:45:45.000000000 +0200
+++ linux-2.6.31-rc/drivers/input/touchscreen/ucb1400_ts.c 2009-07-09 14:46:57.000000000 +0200
@@ -128,7 +128,7 @@
return ucb1400_adc_read(ucb->ac97, 0, adcsync);
}
-static inline int ucb1400_ts_pen_down(struct snd_ac97 *ac97)
+static inline int ucb1400_ts_pen_up(struct snd_ac97 *ac97)
{
unsigned short val = ucb1400_reg_read(ac97, UCB_TS_CR);
return val & (UCB_TS_CR_TSPX_LOW | UCB_TS_CR_TSMX_LOW);
@@ -209,7 +209,7 @@
msleep(10);
- if (ucb1400_ts_pen_down(ucb->ac97)) {
+ if (ucb1400_ts_pen_up(ucb->ac97)) {
ucb1400_ts_irq_enable(ucb->ac97);
/*
next reply other threads:[~2009-07-09 14:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 14:46 Hans J. Koch [this message]
2009-07-13 3:47 ` [PATCH] trivial: ucb1400_ts: Fix a misleading function name Dmitry Torokhov
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=20090709144620.GC3646@local \
--to=hjk@linutronix.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nico@cam.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.