diff options
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index ad4c414dbfbc..56086363becc 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -57,7 +57,7 @@ enum hp_wmi_radio { | |||
57 | HPWMI_WWAN = 2, | 57 | HPWMI_WWAN = 2, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static int __init hp_wmi_bios_setup(struct platform_device *device); | 60 | static int __devinit hp_wmi_bios_setup(struct platform_device *device); |
61 | static int __exit hp_wmi_bios_remove(struct platform_device *device); | 61 | static int __exit hp_wmi_bios_remove(struct platform_device *device); |
62 | static int hp_wmi_resume_handler(struct device *device); | 62 | static int hp_wmi_resume_handler(struct device *device); |
63 | 63 | ||
@@ -89,6 +89,7 @@ static struct key_entry hp_wmi_keymap[] = { | |||
89 | {KE_KEY, 0x20e6, KEY_PROG1}, | 89 | {KE_KEY, 0x20e6, KEY_PROG1}, |
90 | {KE_KEY, 0x2142, KEY_MEDIA}, | 90 | {KE_KEY, 0x2142, KEY_MEDIA}, |
91 | {KE_KEY, 0x213b, KEY_INFO}, | 91 | {KE_KEY, 0x213b, KEY_INFO}, |
92 | {KE_KEY, 0x2169, KEY_DIRECTION}, | ||
92 | {KE_KEY, 0x231b, KEY_HELP}, | 93 | {KE_KEY, 0x231b, KEY_HELP}, |
93 | {KE_END, 0} | 94 | {KE_END, 0} |
94 | }; | 95 | }; |
@@ -277,7 +278,7 @@ static DEVICE_ATTR(als, S_IRUGO | S_IWUSR, show_als, set_als); | |||
277 | static DEVICE_ATTR(dock, S_IRUGO, show_dock, NULL); | 278 | static DEVICE_ATTR(dock, S_IRUGO, show_dock, NULL); |
278 | static DEVICE_ATTR(tablet, S_IRUGO, show_tablet, NULL); | 279 | static DEVICE_ATTR(tablet, S_IRUGO, show_tablet, NULL); |
279 | 280 | ||
280 | static struct key_entry *hp_wmi_get_entry_by_scancode(int code) | 281 | static struct key_entry *hp_wmi_get_entry_by_scancode(unsigned int code) |
281 | { | 282 | { |
282 | struct key_entry *key; | 283 | struct key_entry *key; |
283 | 284 | ||
@@ -288,7 +289,7 @@ static struct key_entry *hp_wmi_get_entry_by_scancode(int code) | |||
288 | return NULL; | 289 | return NULL; |
289 | } | 290 | } |
290 | 291 | ||
291 | static struct key_entry *hp_wmi_get_entry_by_keycode(int keycode) | 292 | static struct key_entry *hp_wmi_get_entry_by_keycode(unsigned int keycode) |
292 | { | 293 | { |
293 | struct key_entry *key; | 294 | struct key_entry *key; |
294 | 295 | ||
@@ -299,7 +300,8 @@ static struct key_entry *hp_wmi_get_entry_by_keycode(int keycode) | |||
299 | return NULL; | 300 | return NULL; |
300 | } | 301 | } |
301 | 302 | ||
302 | static int hp_wmi_getkeycode(struct input_dev *dev, int scancode, int *keycode) | 303 | static int hp_wmi_getkeycode(struct input_dev *dev, |
304 | unsigned int scancode, unsigned int *keycode) | ||
303 | { | 305 | { |
304 | struct key_entry *key = hp_wmi_get_entry_by_scancode(scancode); | 306 | struct key_entry *key = hp_wmi_get_entry_by_scancode(scancode); |
305 | 307 | ||
@@ -311,13 +313,11 @@ static int hp_wmi_getkeycode(struct input_dev *dev, int scancode, int *keycode) | |||
311 | return -EINVAL; | 313 | return -EINVAL; |
312 | } | 314 | } |
313 | 315 | ||
314 | static int hp_wmi_setkeycode(struct input_dev *dev, int scancode, int keycode) | 316 | static int hp_wmi_setkeycode(struct input_dev *dev, |
317 | unsigned int scancode, unsigned int keycode) | ||
315 | { | 318 | { |
316 | struct key_entry *key; | 319 | struct key_entry *key; |
317 | int old_keycode; | 320 | unsigned int old_keycode; |
318 | |||
319 | if (keycode < 0 || keycode > KEY_MAX) | ||
320 | return -EINVAL; | ||
321 | 321 | ||
322 | key = hp_wmi_get_entry_by_scancode(scancode); | 322 | key = hp_wmi_get_entry_by_scancode(scancode); |
323 | if (key && key->type == KE_KEY) { | 323 | if (key && key->type == KE_KEY) { |
@@ -446,7 +446,7 @@ static void cleanup_sysfs(struct platform_device *device) | |||
446 | device_remove_file(&device->dev, &dev_attr_tablet); | 446 | device_remove_file(&device->dev, &dev_attr_tablet); |
447 | } | 447 | } |
448 | 448 | ||
449 | static int __init hp_wmi_bios_setup(struct platform_device *device) | 449 | static int __devinit hp_wmi_bios_setup(struct platform_device *device) |
450 | { | 450 | { |
451 | int err; | 451 | int err; |
452 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | 452 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); |