diff options
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 7ccf33c08967..51c07a05a7bc 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/types.h> | 30 | #include <linux/types.h> |
30 | #include <linux/input.h> | 31 | #include <linux/input.h> |
31 | #include <acpi/acpi_drivers.h> | 32 | #include <acpi/acpi_drivers.h> |
@@ -278,7 +279,7 @@ static DEVICE_ATTR(als, S_IRUGO | S_IWUSR, show_als, set_als); | |||
278 | static DEVICE_ATTR(dock, S_IRUGO, show_dock, NULL); | 279 | static DEVICE_ATTR(dock, S_IRUGO, show_dock, NULL); |
279 | static DEVICE_ATTR(tablet, S_IRUGO, show_tablet, NULL); | 280 | static DEVICE_ATTR(tablet, S_IRUGO, show_tablet, NULL); |
280 | 281 | ||
281 | static struct key_entry *hp_wmi_get_entry_by_scancode(int code) | 282 | static struct key_entry *hp_wmi_get_entry_by_scancode(unsigned int code) |
282 | { | 283 | { |
283 | struct key_entry *key; | 284 | struct key_entry *key; |
284 | 285 | ||
@@ -289,7 +290,7 @@ static struct key_entry *hp_wmi_get_entry_by_scancode(int code) | |||
289 | return NULL; | 290 | return NULL; |
290 | } | 291 | } |
291 | 292 | ||
292 | static struct key_entry *hp_wmi_get_entry_by_keycode(int keycode) | 293 | static struct key_entry *hp_wmi_get_entry_by_keycode(unsigned int keycode) |
293 | { | 294 | { |
294 | struct key_entry *key; | 295 | struct key_entry *key; |
295 | 296 | ||
@@ -300,7 +301,8 @@ static struct key_entry *hp_wmi_get_entry_by_keycode(int keycode) | |||
300 | return NULL; | 301 | return NULL; |
301 | } | 302 | } |
302 | 303 | ||
303 | static int hp_wmi_getkeycode(struct input_dev *dev, int scancode, int *keycode) | 304 | static int hp_wmi_getkeycode(struct input_dev *dev, |
305 | unsigned int scancode, unsigned int *keycode) | ||
304 | { | 306 | { |
305 | struct key_entry *key = hp_wmi_get_entry_by_scancode(scancode); | 307 | struct key_entry *key = hp_wmi_get_entry_by_scancode(scancode); |
306 | 308 | ||
@@ -312,13 +314,11 @@ static int hp_wmi_getkeycode(struct input_dev *dev, int scancode, int *keycode) | |||
312 | return -EINVAL; | 314 | return -EINVAL; |
313 | } | 315 | } |
314 | 316 | ||
315 | static int hp_wmi_setkeycode(struct input_dev *dev, int scancode, int keycode) | 317 | static int hp_wmi_setkeycode(struct input_dev *dev, |
318 | unsigned int scancode, unsigned int keycode) | ||
316 | { | 319 | { |
317 | struct key_entry *key; | 320 | struct key_entry *key; |
318 | int old_keycode; | 321 | unsigned int old_keycode; |
319 | |||
320 | if (keycode < 0 || keycode > KEY_MAX) | ||
321 | return -EINVAL; | ||
322 | 322 | ||
323 | key = hp_wmi_get_entry_by_scancode(scancode); | 323 | key = hp_wmi_get_entry_by_scancode(scancode); |
324 | if (key && key->type == KE_KEY) { | 324 | if (key && key->type == KE_KEY) { |