Commit 20c9aa46f644b3ddb161a819d1b0c2b07097c4ee
Committed by
Len Brown
1 parent
06777be6d8
Exists in
master
and in
4 other branches
thinkpad-acpi: Fix procfs hotkey reset command
echo "reset" > /proc/acpi/ibm/hotkey should do something non-useless, so instead of setting it to Fn+F2, Fn+F3, Fn+F5, set it to hotkey_recommended_mask. It is not like it will survive for much longer, anyway. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
Showing 2 changed files with 3 additions and 2 deletions Side-by-side Diff
Documentation/laptops/thinkpad-acpi.txt
... | ... | @@ -219,7 +219,7 @@ |
219 | 219 | echo 0xffffffff > /proc/acpi/ibm/hotkey -- enable all hot keys |
220 | 220 | echo 0 > /proc/acpi/ibm/hotkey -- disable all possible hot keys |
221 | 221 | ... any other 8-hex-digit mask ... |
222 | - echo reset > /proc/acpi/ibm/hotkey -- restore the original mask | |
222 | + echo reset > /proc/acpi/ibm/hotkey -- restore the recommended mask | |
223 | 223 | |
224 | 224 | The following commands have been deprecated and will cause the kernel |
225 | 225 | to log a warning: |
drivers/platform/x86/thinkpad_acpi.c
... | ... | @@ -3569,7 +3569,8 @@ |
3569 | 3569 | hotkey_enabledisable_warn(0); |
3570 | 3570 | res = -EPERM; |
3571 | 3571 | } else if (strlencmp(cmd, "reset") == 0) { |
3572 | - mask = hotkey_orig_mask; | |
3572 | + mask = (hotkey_all_mask | hotkey_source_mask) | |
3573 | + & ~hotkey_reserved_mask; | |
3573 | 3574 | } else if (sscanf(cmd, "0x%x", &mask) == 1) { |
3574 | 3575 | /* mask set */ |
3575 | 3576 | } else if (sscanf(cmd, "%x", &mask) == 1) { |