aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/topstar-laptop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/topstar-laptop.c')
-rw-r--r--drivers/platform/x86/topstar-laptop.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
index 02f3d4e9e666..4d6516fded7e 100644
--- a/drivers/platform/x86/topstar-laptop.c
+++ b/drivers/platform/x86/topstar-laptop.c
@@ -46,7 +46,7 @@ static struct tps_key_entry topstar_keymap[] = {
46 { } 46 { }
47}; 47};
48 48
49static struct tps_key_entry *tps_get_key_by_scancode(int code) 49static struct tps_key_entry *tps_get_key_by_scancode(unsigned int code)
50{ 50{
51 struct tps_key_entry *key; 51 struct tps_key_entry *key;
52 52
@@ -57,7 +57,7 @@ static struct tps_key_entry *tps_get_key_by_scancode(int code)
57 return NULL; 57 return NULL;
58} 58}
59 59
60static struct tps_key_entry *tps_get_key_by_keycode(int code) 60static struct tps_key_entry *tps_get_key_by_keycode(unsigned int code)
61{ 61{
62 struct tps_key_entry *key; 62 struct tps_key_entry *key;
63 63
@@ -126,7 +126,8 @@ static int acpi_topstar_fncx_switch(struct acpi_device *device, bool state)
126 return 0; 126 return 0;
127} 127}
128 128
129static int topstar_getkeycode(struct input_dev *dev, int scancode, int *keycode) 129static int topstar_getkeycode(struct input_dev *dev,
130 unsigned int scancode, unsigned int *keycode)
130{ 131{
131 struct tps_key_entry *key = tps_get_key_by_scancode(scancode); 132 struct tps_key_entry *key = tps_get_key_by_scancode(scancode);
132 133
@@ -137,14 +138,12 @@ static int topstar_getkeycode(struct input_dev *dev, int scancode, int *keycode)
137 return 0; 138 return 0;
138} 139}
139 140
140static int topstar_setkeycode(struct input_dev *dev, int scancode, int keycode) 141static int topstar_setkeycode(struct input_dev *dev,
142 unsigned int scancode, unsigned int keycode)
141{ 143{
142 struct tps_key_entry *key; 144 struct tps_key_entry *key;
143 int old_keycode; 145 int old_keycode;
144 146
145 if (keycode < 0 || keycode > KEY_MAX)
146 return -EINVAL;
147
148 key = tps_get_key_by_scancode(scancode); 147 key = tps_get_key_by_scancode(scancode);
149 148
150 if (!key) 149 if (!key)