diff options
author | Frans Pop <elendil@planet.nl> | 2010-03-01 09:50:46 -0500 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2010-03-01 09:50:46 -0500 |
commit | b466301b842f3a54e219b5cc587f22233ecb1345 (patch) | |
tree | 757842744b05def32ca3d5dfd45950ffa8a6d438 | |
parent | 92e00e47b61f558009ff81be42b412a76fd89d84 (diff) | |
download | kernel_samsung_tuna-b466301b842f3a54e219b5cc587f22233ecb1345.zip kernel_samsung_tuna-b466301b842f3a54e219b5cc587f22233ecb1345.tar.gz kernel_samsung_tuna-b466301b842f3a54e219b5cc587f22233ecb1345.tar.bz2 |
toshiba-acpi: fix multimedia keys on some machines
Some Toshibas only send ACPI events on key down, not key release. Ignore
any release events and send key down and key up events on every ACPI key
down event.
Signed-off-by: Frans Pop <elendil@planet.nl>
-rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 26c2117..405b969 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/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 |