summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/pxa27x_keypad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/pxa27x_keypad.c')
-rw-r--r--drivers/input/keyboard/pxa27x_keypad.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 6224c2fb3b65..4e651c11c1da 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -50,9 +50,9 @@
#define KPKDI 0x0048
/* bit definitions */
-#define KPC_MKRN(n) ((((n) & 0x7) - 1) << 26) /* matrix key row number */
-#define KPC_MKCN(n) ((((n) & 0x7) - 1) << 23) /* matrix key column number */
-#define KPC_DKN(n) ((((n) & 0x7) - 1) << 6) /* direct key number */
+#define KPC_MKRN(n) ((((n) - 1) & 0x7) << 26) /* matrix key row number */
+#define KPC_MKCN(n) ((((n) - 1) & 0x7) << 23) /* matrix key column number */
+#define KPC_DKN(n) ((((n) - 1) & 0x7) << 6) /* direct key number */
#define KPC_AS (0x1 << 30) /* Automatic Scan bit */
#define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */