From 3228b8655c2cc0abcba7ab50108251d22cba1f15 Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Mon, 1 Mar 2010 09:50:46 -0500 Subject: [PATCH] --- yaml --- r: 185039 b: refs/heads/master c: b466301b842f3a54e219b5cc587f22233ecb1345 h: refs/heads/master i: 185037: d519580696133d1e6f3571d06c806656893476d9 185035: 9ff906201aee72ef965970b3c7a84ef97c1b7183 185031: 9e5a80c5ff40b98dd81feefe709ff1c29237fb59 185023: dc5911eda39dec77a8f9ac7032ba7ec4814beab2 v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/toshiba_acpi.c | 30 ++++++++++++----------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index a5db99d678c7..fe6be96651e8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 92e00e47b61f558009ff81be42b412a76fd89d84 +refs/heads/master: b466301b842f3a54e219b5cc587f22233ecb1345 diff --git a/trunk/drivers/platform/x86/toshiba_acpi.c b/trunk/drivers/platform/x86/toshiba_acpi.c index 26c211724acf..405b969734d6 100644 --- a/trunk/drivers/platform/x86/toshiba_acpi.c +++ b/trunk/drivers/platform/x86/toshiba_acpi.c @@ -814,21 +814,23 @@ static void toshiba_acpi_notify(acpi_handle handle, u32 event, void *context) if (hci_result == HCI_SUCCESS) { if (value == 0x100) continue; - else if (value & 0x80) { - key = toshiba_acpi_get_entry_by_scancode - (value & ~0x80); - if (!key) { - printk(MY_INFO "Unknown key %x\n", - value & ~0x80); - continue; - } - input_report_key(toshiba_acpi.hotkey_dev, - key->keycode, 1); - input_sync(toshiba_acpi.hotkey_dev); - input_report_key(toshiba_acpi.hotkey_dev, - key->keycode, 0); - input_sync(toshiba_acpi.hotkey_dev); + /* act on key press; ignore key release */ + if (value & 0x80) + continue; + + key = toshiba_acpi_get_entry_by_scancode + (value); + if (!key) { + printk(MY_INFO "Unknown key %x\n", + value); + continue; } + input_report_key(toshiba_acpi.hotkey_dev, + key->keycode, 1); + input_sync(toshiba_acpi.hotkey_dev); + input_report_key(toshiba_acpi.hotkey_dev, + key->keycode, 0); + input_sync(toshiba_acpi.hotkey_dev); } else if (hci_result == HCI_NOT_SUPPORTED) { /* This is a workaround for an unresolved issue on * some machines where system events sporadically