diff options
| -rw-r--r-- | drivers/platform/x86/msi-wmi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c index bde607d98d6f..35278ad7e628 100644 --- a/drivers/platform/x86/msi-wmi.c +++ b/drivers/platform/x86/msi-wmi.c | |||
| @@ -43,12 +43,12 @@ MODULE_ALIAS("wmi:B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2"); | |||
| 43 | 43 | ||
| 44 | #define dprintk(msg...) pr_debug(DRV_PFX msg) | 44 | #define dprintk(msg...) pr_debug(DRV_PFX msg) |
| 45 | 45 | ||
| 46 | #define KEYCODE_BASE 0xD0 | 46 | #define SCANCODE_BASE 0xD0 |
| 47 | #define MSI_WMI_BRIGHTNESSUP KEYCODE_BASE | 47 | #define MSI_WMI_BRIGHTNESSUP SCANCODE_BASE |
| 48 | #define MSI_WMI_BRIGHTNESSDOWN (KEYCODE_BASE + 1) | 48 | #define MSI_WMI_BRIGHTNESSDOWN (SCANCODE_BASE + 1) |
| 49 | #define MSI_WMI_VOLUMEUP (KEYCODE_BASE + 2) | 49 | #define MSI_WMI_VOLUMEUP (SCANCODE_BASE + 2) |
| 50 | #define MSI_WMI_VOLUMEDOWN (KEYCODE_BASE + 3) | 50 | #define MSI_WMI_VOLUMEDOWN (SCANCODE_BASE + 3) |
| 51 | #define MSI_WMI_MUTE (KEYCODE_BASE + 4) | 51 | #define MSI_WMI_MUTE (SCANCODE_BASE + 4) |
| 52 | static struct key_entry msi_wmi_keymap[] = { | 52 | static struct key_entry msi_wmi_keymap[] = { |
| 53 | { KE_KEY, MSI_WMI_BRIGHTNESSUP, {KEY_BRIGHTNESSUP} }, | 53 | { KE_KEY, MSI_WMI_BRIGHTNESSUP, {KEY_BRIGHTNESSUP} }, |
| 54 | { KE_KEY, MSI_WMI_BRIGHTNESSDOWN, {KEY_BRIGHTNESSDOWN} }, | 54 | { KE_KEY, MSI_WMI_BRIGHTNESSDOWN, {KEY_BRIGHTNESSDOWN} }, |
| @@ -171,7 +171,7 @@ static void msi_wmi_notify(u32 value, void *context) | |||
| 171 | ktime_t diff; | 171 | ktime_t diff; |
| 172 | cur = ktime_get_real(); | 172 | cur = ktime_get_real(); |
| 173 | diff = ktime_sub(cur, last_pressed[key->code - | 173 | diff = ktime_sub(cur, last_pressed[key->code - |
| 174 | KEYCODE_BASE]); | 174 | SCANCODE_BASE]); |
| 175 | /* Ignore event if the same event happened in a 50 ms | 175 | /* Ignore event if the same event happened in a 50 ms |
| 176 | timeframe -> Key press may result in 10-20 GPEs */ | 176 | timeframe -> Key press may result in 10-20 GPEs */ |
| 177 | if (ktime_to_us(diff) < 1000 * 50) { | 177 | if (ktime_to_us(diff) < 1000 * 50) { |
| @@ -180,7 +180,7 @@ static void msi_wmi_notify(u32 value, void *context) | |||
| 180 | key->code, ktime_to_us(diff)); | 180 | key->code, ktime_to_us(diff)); |
| 181 | return; | 181 | return; |
| 182 | } | 182 | } |
| 183 | last_pressed[key->code - KEYCODE_BASE] = cur; | 183 | last_pressed[key->code - SCANCODE_BASE] = cur; |
| 184 | 184 | ||
| 185 | if (key->type == KE_KEY && | 185 | if (key->type == KE_KEY && |
| 186 | /* Brightness is served via acpi video driver */ | 186 | /* Brightness is served via acpi video driver */ |
