lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090709144620.GC3646@local>
Date:	Thu, 9 Jul 2009 16:46:21 +0200
From:	"Hans J. Koch" <hjk@...utronix.de>
To:	linux-kernel@...r.kernel.org
Cc:	dmitry.torokhov@...il.com, nico@....org
Subject: [PATCH] trivial: ucb1400_ts: Fix a misleading function name

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@...utronix.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);
 
 			/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ