summaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.26/1136-fix-KEY_PHONE-up-down-inversion.patch.patch
blob: aa28e29de79600f7b304e03d43b2b343f7ece694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 5d4a157601b55c84ffe8886411f0b84c8de3d385 Mon Sep 17 00:00:00 2001
From: Sean McNeil <sean@mcneil.com>
Date: Fri, 25 Jul 2008 23:06:08 +0100
Subject: [PATCH] fix-KEY_PHONE-up-down-inversion.patch

the KEY_PHONE is backwards. It returns up when pushed and down when
released. The following change fixes it:

Signed-off-by: Sean McNeil <sean@mcneil.com>
---
 drivers/input/keyboard/neo1973kbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/neo1973kbd.c b/drivers/input/keyboard/neo1973kbd.c
index d22f377..3076af3 100644
--- a/drivers/input/keyboard/neo1973kbd.c
+++ b/drivers/input/keyboard/neo1973kbd.c
@@ -40,7 +40,7 @@ static irqreturn_t neo1973kbd_aux_irq(int irq, void *dev_id)
 {
 	struct neo1973kbd *neo1973kbd_data = dev_id;
 
-	int key_pressed = !gpio_get_value(irq_to_gpio(irq));
+	int key_pressed = !!gpio_get_value(irq_to_gpio(irq));
 	input_report_key(neo1973kbd_data->input, KEY_PHONE, key_pressed);
 	input_sync(neo1973kbd_data->input);
 
-- 
1.5.6.3