Commit ff413195e830541afeae469fc866ecd0319abd7e

Authored by Alex Hung
Committed by Matthew Garrett
1 parent 96960880c3

thinkpad-acpi: fix issuing duplicated key events for brightness up/down

The tp_features.bright_acpimode will not be set correctly for brightness
control because ACPI_VIDEO_HID will not be located in ACPI. As a result,
a duplicated key event will always be sent. acpi_video_backlight_support()
is sufficient to detect standard ACPI brightness control.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/platform/x86/thinkpad_acpi.c
... ... @@ -3402,7 +3402,7 @@
3402 3402 /* Do not issue duplicate brightness change events to
3403 3403 * userspace. tpacpi_detect_brightness_capabilities() must have
3404 3404 * been called before this point */
3405   - if (tp_features.bright_acpimode && acpi_video_backlight_support()) {
  3405 + if (acpi_video_backlight_support()) {
3406 3406 pr_info("This ThinkPad has standard ACPI backlight "
3407 3407 "brightness control, supported by the ACPI "
3408 3408 "video driver\n");