Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222988
b: refs/heads/master
c: a80e1cd
h: refs/heads/master
v: v3
  • Loading branch information
Anisse Astier authored and Matthew Garrett committed Nov 24, 2010
1 parent e9a323b commit 6f392f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92f61cbc614fb422759790739cbd3e5a68c9a6fc
refs/heads/master: a80e1cd70144fe7727f2e2d838611b6b8cf8a6d5
16 changes: 8 additions & 8 deletions trunk/drivers/platform/x86/msi-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ MODULE_ALIAS("wmi:B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2");

#define dprintk(msg...) pr_debug(DRV_PFX msg)

#define KEYCODE_BASE 0xD0
#define MSI_WMI_BRIGHTNESSUP KEYCODE_BASE
#define MSI_WMI_BRIGHTNESSDOWN (KEYCODE_BASE + 1)
#define MSI_WMI_VOLUMEUP (KEYCODE_BASE + 2)
#define MSI_WMI_VOLUMEDOWN (KEYCODE_BASE + 3)
#define MSI_WMI_MUTE (KEYCODE_BASE + 4)
#define SCANCODE_BASE 0xD0
#define MSI_WMI_BRIGHTNESSUP SCANCODE_BASE
#define MSI_WMI_BRIGHTNESSDOWN (SCANCODE_BASE + 1)
#define MSI_WMI_VOLUMEUP (SCANCODE_BASE + 2)
#define MSI_WMI_VOLUMEDOWN (SCANCODE_BASE + 3)
#define MSI_WMI_MUTE (SCANCODE_BASE + 4)
static struct key_entry msi_wmi_keymap[] = {
{ KE_KEY, MSI_WMI_BRIGHTNESSUP, {KEY_BRIGHTNESSUP} },
{ KE_KEY, MSI_WMI_BRIGHTNESSDOWN, {KEY_BRIGHTNESSDOWN} },
Expand Down Expand Up @@ -171,7 +171,7 @@ static void msi_wmi_notify(u32 value, void *context)
ktime_t diff;
cur = ktime_get_real();
diff = ktime_sub(cur, last_pressed[key->code -
KEYCODE_BASE]);
SCANCODE_BASE]);
/* Ignore event if the same event happened in a 50 ms
timeframe -> Key press may result in 10-20 GPEs */
if (ktime_to_us(diff) < 1000 * 50) {
Expand All @@ -180,7 +180,7 @@ static void msi_wmi_notify(u32 value, void *context)
key->code, ktime_to_us(diff));
return;
}
last_pressed[key->code - KEYCODE_BASE] = cur;
last_pressed[key->code - SCANCODE_BASE] = cur;

if (key->type == KE_KEY &&
/* Brightness is served via acpi video driver */
Expand Down

0 comments on commit 6f392f8

Please sign in to comment.