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-prev] [day] [month] [year] [list]
Message-ID: <20100429130852.GC1661@ucw.cz>
Date:	Thu, 29 Apr 2010 15:08:52 +0200
From:	Pavel Machek <pavel@....cz>
To:	Eric Miao <eric.y.miao@...il.com>
Cc:	dtor@...l.ru, linux-input@...r.kernel.org, rpurdie@...ys.net,
	lenz@...wisc.edu, kernel list <linux-kernel@...r.kernel.org>,
	Dirk@...er-online.de, arminlitzel@....de,
	Cyril Hrubis <metan@....cz>, thommycheck@...il.com,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	dbaryshkov@...il.com, omegamoon@...il.com, utx@...guin.cz,
	zaurus-devel@...ts.linuxtogo.org,
	"Rafael J. Wysocki" <rjw@...k.pl>, Andrew Morton <akpm@...l.org>
Subject: Re: sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1

Hi!

Okay, maybe this is better fix for the regression?

Simplify irq wakeup code, and fix ugly warning during resume on spitz
as a result.

Signed-off-by: Pavel Machek <pavel@....cz>

--- ./drivers/input/keyboard/pxa27x_keypad.c	2010-04-15 07:50:34.000000000 +0200
+++ ./drivers/input/keyboard/pxa27x_keypad.c	2010-04-27 15:38:02.000000000 +0200
@@ -33,6 +33,8 @@
 
 #include <mach/hardware.h>
 #include <mach/pxa27x_keypad.h>
+#include <mach/mfp-pxa2xx.h>
+
 /*
  * Keypad Controller registers
  */
@@ -412,7 +416,7 @@
 	clk_disable(keypad->clk);
 
 	if (device_may_wakeup(&pdev->dev))
-		enable_irq_wake(keypad->irq);
+		keypad_set_wake(1);
 
 	return 0;
 }
@@ -424,7 +428,7 @@
 	struct input_dev *input_dev = keypad->input_dev;
 
 	if (device_may_wakeup(&pdev->dev))
-		disable_irq_wake(keypad->irq);
+		keypad_set_wake(0);
 
 	mutex_lock(&input_dev->mutex);
 
--- ./arch/arm/mach-pxa/mfp-pxa2xx.c	2009-09-10 00:13:59.000000000 +0200
+++ ./arch/arm/mach-pxa/mfp-pxa2xx.c	2010-04-27 15:22:42.000000000 +0200
@@ -34,7 +34,6 @@
 struct gpio_desc {
 	unsigned	valid		: 1;
 	unsigned	can_wakeup	: 1;
-	unsigned	keypad_gpio	: 1;
 	unsigned	dir_inverted	: 1;
 	unsigned int	mask; /* bit mask in PWER or PKWR */
 	unsigned int	mux_mask; /* bit mask of muxed gpio bits, 0 if no mux */
@@ -178,9 +177,6 @@
 	if (!d->valid)
 		return -EINVAL;
 
-	if (d->keypad_gpio)
-		return -EINVAL;
-
 	mux_taken = (PWER & d->mux_mask) & (~d->mask);
 	if (on && mux_taken)
 		return -EBUSY;
@@ -291,7 +288,6 @@
 	for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
 		gpio = pxa27x_pkwr_gpio[i];
 		gpio_desc[gpio].can_wakeup = 1;
-		gpio_desc[gpio].keypad_gpio = 1;
 		gpio_desc[gpio].mask = 1 << i;
 	}
 
--- ./arch/arm/mach-pxa/pxa27x.c	2010-03-21 22:09:12.000000000 +0100
+++ ./arch/arm/mach-pxa/pxa27x.c	2010-04-27 07:43:30.000000000 +0200
@@ -342,9 +342,6 @@
 	if (gpio >= 0 && gpio < 128)
 		return gpio_set_wake(gpio, on);
 
-	if (irq == IRQ_KEYPAD)
-		return keypad_set_wake(on);
-
 	switch (irq) {
 	case IRQ_RTCAlrm:
 		mask = PWER_RTC;


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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