diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2010-04-23 02:08:44 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2010-04-23 02:08:44 +0200 |
| commit | 6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1 (patch) | |
| tree | 797676a336b050bfa1ef879377c07e541b9075d6 /drivers/platform/x86/topstar-laptop.c | |
| parent | 4cb3ca7cd7e2cae8d1daf5345ec99a1e8502cf3f (diff) | |
| parent | c81eddb0e3728661d1585fbc564449c94165cc36 (diff) | |
Merge branch 'master' into for-next
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 02f3d4e9e66..ff4b476f195 100644 --- a/drivers/platform/x86/topstar-laptop.c +++ b/drivers/platform/x86/topstar-laptop.c @@ -16,6 +16,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/slab.h> #include <linux/acpi.h> #include <linux/input.h> @@ -46,7 +47,7 @@ static struct tps_key_entry topstar_keymap[] = { { } }; -static struct tps_key_entry *tps_get_key_by_scancode(int code) +static struct tps_key_entry *tps_get_key_by_scancode(unsigned int code) { struct tps_key_entry *key; @@ -57,7 +58,7 @@ static struct tps_key_entry *tps_get_key_by_scancode(int code) return NULL; } -static struct tps_key_entry *tps_get_key_by_keycode(int code) +static struct tps_key_entry *tps_get_key_by_keycode(unsigned int code) { struct tps_key_entry *key; @@ -126,7 +127,8 @@ static int acpi_topstar_fncx_switch(struct acpi_device *device, bool state) return 0; } -static int topstar_getkeycode(struct input_dev *dev, int scancode, int *keycode) +static int topstar_getkeycode(struct input_dev *dev, + unsigned int scancode, unsigned int *keycode) { struct tps_key_entry *key = tps_get_key_by_scancode(scancode); @@ -137,14 +139,12 @@ static int topstar_getkeycode(struct input_dev *dev, int scancode, int *keycode) return 0; } -static int topstar_setkeycode(struct input_dev *dev, int scancode, int keycode) +static int topstar_setkeycode(struct input_dev *dev, + unsigned int scancode, unsigned int keycode) { struct tps_key_entry *key; int old_keycode; - if (keycode < 0 || keycode > KEY_MAX) - return -EINVAL; - key = tps_get_key_by_scancode(scancode); if (!key) |
