aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/apm-power.c7
-rw-r--r--drivers/input/keyboard/pxa27x_keypad.c6
2 files changed, 5 insertions, 8 deletions
diff --git a/drivers/input/apm-power.c b/drivers/input/apm-power.c
index c36d110b349a..7d61a9660806 100644
--- a/drivers/input/apm-power.c
+++ b/drivers/input/apm-power.c
@@ -63,8 +63,6 @@ static int apmpower_connect(struct input_handler *handler,
63 handle->handler = handler; 63 handle->handler = handler;
64 handle->name = "apm-power"; 64 handle->name = "apm-power";
65 65
66 handler->private = handle;
67
68 error = input_register_handle(handle); 66 error = input_register_handle(handle);
69 if (error) { 67 if (error) {
70 printk(KERN_ERR 68 printk(KERN_ERR
@@ -87,11 +85,10 @@ static int apmpower_connect(struct input_handler *handler,
87 return 0; 85 return 0;
88} 86}
89 87
90static void apmpower_disconnect(struct input_handle *handler) 88static void apmpower_disconnect(struct input_handle *handle)
91{ 89{
92 struct input_handle *handle = handler->private;
93
94 input_close_device(handle); 90 input_close_device(handle);
91 input_unregister_handle(handle);
95 kfree(handle); 92 kfree(handle);
96} 93}
97 94
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 @@
50#define KPKDI 0x0048 50#define KPKDI 0x0048
51 51
52/* bit definitions */ 52/* bit definitions */
53#define KPC_MKRN(n) ((((n) & 0x7) - 1) << 26) /* matrix key row number */ 53#define KPC_MKRN(n) ((((n) - 1) & 0x7) << 26) /* matrix key row number */
54#define KPC_MKCN(n) ((((n) & 0x7) - 1) << 23) /* matrix key column number */ 54#define KPC_MKCN(n) ((((n) - 1) & 0x7) << 23) /* matrix key column number */
55#define KPC_DKN(n) ((((n) & 0x7) - 1) << 6) /* direct key number */ 55#define KPC_DKN(n) ((((n) - 1) & 0x7) << 6) /* direct key number */
56 56
57#define KPC_AS (0x1 << 30) /* Automatic Scan bit */ 57#define KPC_AS (0x1 << 30) /* Automatic Scan bit */
58#define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */ 58#define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */