diff options
Diffstat (limited to 'drivers/platform/x86/panasonic-laptop.c')
-rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index fe7cf0188ac..c9fc479fc29 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c | |||
@@ -200,7 +200,7 @@ static struct acpi_driver acpi_pcc_driver = { | |||
200 | }; | 200 | }; |
201 | 201 | ||
202 | #define KEYMAP_SIZE 11 | 202 | #define KEYMAP_SIZE 11 |
203 | static const int initial_keymap[KEYMAP_SIZE] = { | 203 | static const unsigned int initial_keymap[KEYMAP_SIZE] = { |
204 | /* 0 */ KEY_RESERVED, | 204 | /* 0 */ KEY_RESERVED, |
205 | /* 1 */ KEY_BRIGHTNESSDOWN, | 205 | /* 1 */ KEY_BRIGHTNESSDOWN, |
206 | /* 2 */ KEY_BRIGHTNESSUP, | 206 | /* 2 */ KEY_BRIGHTNESSUP, |
@@ -222,7 +222,7 @@ struct pcc_acpi { | |||
222 | struct acpi_device *device; | 222 | struct acpi_device *device; |
223 | struct input_dev *input_dev; | 223 | struct input_dev *input_dev; |
224 | struct backlight_device *backlight; | 224 | struct backlight_device *backlight; |
225 | int keymap[KEYMAP_SIZE]; | 225 | unsigned int keymap[KEYMAP_SIZE]; |
226 | }; | 226 | }; |
227 | 227 | ||
228 | struct pcc_keyinput { | 228 | struct pcc_keyinput { |
@@ -445,7 +445,8 @@ static struct attribute_group pcc_attr_group = { | |||
445 | 445 | ||
446 | /* hotkey input device driver */ | 446 | /* hotkey input device driver */ |
447 | 447 | ||
448 | static int pcc_getkeycode(struct input_dev *dev, int scancode, int *keycode) | 448 | static int pcc_getkeycode(struct input_dev *dev, |
449 | unsigned int scancode, unsigned int *keycode) | ||
449 | { | 450 | { |
450 | struct pcc_acpi *pcc = input_get_drvdata(dev); | 451 | struct pcc_acpi *pcc = input_get_drvdata(dev); |
451 | 452 | ||
@@ -457,7 +458,7 @@ static int pcc_getkeycode(struct input_dev *dev, int scancode, int *keycode) | |||
457 | return 0; | 458 | return 0; |
458 | } | 459 | } |
459 | 460 | ||
460 | static int keymap_get_by_keycode(struct pcc_acpi *pcc, int keycode) | 461 | static int keymap_get_by_keycode(struct pcc_acpi *pcc, unsigned int keycode) |
461 | { | 462 | { |
462 | int i; | 463 | int i; |
463 | 464 | ||
@@ -469,7 +470,8 @@ static int keymap_get_by_keycode(struct pcc_acpi *pcc, int keycode) | |||
469 | return 0; | 470 | return 0; |
470 | } | 471 | } |
471 | 472 | ||
472 | static int pcc_setkeycode(struct input_dev *dev, int scancode, int keycode) | 473 | static int pcc_setkeycode(struct input_dev *dev, |
474 | unsigned int scancode, unsigned int keycode) | ||
473 | { | 475 | { |
474 | struct pcc_acpi *pcc = input_get_drvdata(dev); | 476 | struct pcc_acpi *pcc = input_get_drvdata(dev); |
475 | int oldkeycode; | 477 | int oldkeycode; |
@@ -477,9 +479,6 @@ static int pcc_setkeycode(struct input_dev *dev, int scancode, int keycode) | |||
477 | if (scancode >= ARRAY_SIZE(pcc->keymap)) | 479 | if (scancode >= ARRAY_SIZE(pcc->keymap)) |
478 | return -EINVAL; | 480 | return -EINVAL; |
479 | 481 | ||
480 | if (keycode < 0 || keycode > KEY_MAX) | ||
481 | return -EINVAL; | ||
482 | |||
483 | oldkeycode = pcc->keymap[scancode]; | 482 | oldkeycode = pcc->keymap[scancode]; |
484 | pcc->keymap[scancode] = keycode; | 483 | pcc->keymap[scancode] = keycode; |
485 | 484 | ||