diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/platform/x86/topstar-laptop.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/platform/x86/topstar-laptop.c')
-rw-r--r-- | drivers/platform/x86/topstar-laptop.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c index 02f3d4e9e666..ff4b476f1950 100644 --- a/drivers/platform/x86/topstar-laptop.c +++ b/drivers/platform/x86/topstar-laptop.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/acpi.h> | 20 | #include <linux/acpi.h> |
20 | #include <linux/input.h> | 21 | #include <linux/input.h> |
21 | 22 | ||
@@ -46,7 +47,7 @@ static struct tps_key_entry topstar_keymap[] = { | |||
46 | { } | 47 | { } |
47 | }; | 48 | }; |
48 | 49 | ||
49 | static struct tps_key_entry *tps_get_key_by_scancode(int code) | 50 | static struct tps_key_entry *tps_get_key_by_scancode(unsigned int code) |
50 | { | 51 | { |
51 | struct tps_key_entry *key; | 52 | struct tps_key_entry *key; |
52 | 53 | ||
@@ -57,7 +58,7 @@ static struct tps_key_entry *tps_get_key_by_scancode(int code) | |||
57 | return NULL; | 58 | return NULL; |
58 | } | 59 | } |
59 | 60 | ||
60 | static struct tps_key_entry *tps_get_key_by_keycode(int code) | 61 | static struct tps_key_entry *tps_get_key_by_keycode(unsigned int code) |
61 | { | 62 | { |
62 | struct tps_key_entry *key; | 63 | struct tps_key_entry *key; |
63 | 64 | ||
@@ -126,7 +127,8 @@ static int acpi_topstar_fncx_switch(struct acpi_device *device, bool state) | |||
126 | return 0; | 127 | return 0; |
127 | } | 128 | } |
128 | 129 | ||
129 | static int topstar_getkeycode(struct input_dev *dev, int scancode, int *keycode) | 130 | static int topstar_getkeycode(struct input_dev *dev, |
131 | unsigned int scancode, unsigned int *keycode) | ||
130 | { | 132 | { |
131 | struct tps_key_entry *key = tps_get_key_by_scancode(scancode); | 133 | struct tps_key_entry *key = tps_get_key_by_scancode(scancode); |
132 | 134 | ||
@@ -137,14 +139,12 @@ static int topstar_getkeycode(struct input_dev *dev, int scancode, int *keycode) | |||
137 | return 0; | 139 | return 0; |
138 | } | 140 | } |
139 | 141 | ||
140 | static int topstar_setkeycode(struct input_dev *dev, int scancode, int keycode) | 142 | static int topstar_setkeycode(struct input_dev *dev, |
143 | unsigned int scancode, unsigned int keycode) | ||
141 | { | 144 | { |
142 | struct tps_key_entry *key; | 145 | struct tps_key_entry *key; |
143 | int old_keycode; | 146 | int old_keycode; |
144 | 147 | ||
145 | if (keycode < 0 || keycode > KEY_MAX) | ||
146 | return -EINVAL; | ||
147 | |||
148 | key = tps_get_key_by_scancode(scancode); | 148 | key = tps_get_key_by_scancode(scancode); |
149 | 149 | ||
150 | if (!key) | 150 | if (!key) |