diff options
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 3aa57da8b43b..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 | ||
@@ -278,7 +278,7 @@ static DEVICE_ATTR(als, S_IRUGO | S_IWUSR, show_als, set_als); | |||
278 | static DEVICE_ATTR(dock, S_IRUGO, show_dock, NULL); | 278 | static DEVICE_ATTR(dock, S_IRUGO, show_dock, NULL); |
279 | static DEVICE_ATTR(tablet, S_IRUGO, show_tablet, NULL); | 279 | static DEVICE_ATTR(tablet, S_IRUGO, show_tablet, NULL); |
280 | 280 | ||
281 | 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) |
282 | { | 282 | { |
283 | struct key_entry *key; | 283 | struct key_entry *key; |
284 | 284 | ||
@@ -289,7 +289,7 @@ static struct key_entry *hp_wmi_get_entry_by_scancode(int code) | |||
289 | return NULL; | 289 | return NULL; |
290 | } | 290 | } |
291 | 291 | ||
292 | 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) |
293 | { | 293 | { |
294 | struct key_entry *key; | 294 | struct key_entry *key; |
295 | 295 | ||
@@ -300,7 +300,8 @@ static struct key_entry *hp_wmi_get_entry_by_keycode(int keycode) | |||
300 | return NULL; | 300 | return NULL; |
301 | } | 301 | } |
302 | 302 | ||
303 | 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) | ||
304 | { | 305 | { |
305 | struct key_entry *key = hp_wmi_get_entry_by_scancode(scancode); | 306 | struct key_entry *key = hp_wmi_get_entry_by_scancode(scancode); |
306 | 307 | ||
@@ -312,13 +313,11 @@ static int hp_wmi_getkeycode(struct input_dev *dev, int scancode, int *keycode) | |||
312 | return -EINVAL; | 313 | return -EINVAL; |
313 | } | 314 | } |
314 | 315 | ||
315 | 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) | ||
316 | { | 318 | { |
317 | struct key_entry *key; | 319 | struct key_entry *key; |
318 | int old_keycode; | 320 | unsigned int old_keycode; |
319 | |||
320 | if (keycode < 0 || keycode > KEY_MAX) | ||
321 | return -EINVAL; | ||
322 | 321 | ||
323 | key = hp_wmi_get_entry_by_scancode(scancode); | 322 | key = hp_wmi_get_entry_by_scancode(scancode); |
324 | if (key && key->type == KE_KEY) { | 323 | if (key && key->type == KE_KEY) { |
@@ -447,7 +446,7 @@ static void cleanup_sysfs(struct platform_device *device) | |||
447 | device_remove_file(&device->dev, &dev_attr_tablet); | 446 | device_remove_file(&device->dev, &dev_attr_tablet); |
448 | } | 447 | } |
449 | 448 | ||
450 | static int __init hp_wmi_bios_setup(struct platform_device *device) | 449 | static int __devinit hp_wmi_bios_setup(struct platform_device *device) |
451 | { | 450 | { |
452 | int err; | 451 | int err; |
453 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | 452 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); |