From: Alex Hung Date: Tue, 24 Apr 2012 08:40:52 +0000 (+0800) Subject: thinkpad-acpi: fix issuing duplicated key events for brightness up/down X-Git-Tag: v3.4.92~100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2467a26e7069cb61fe52d8a8fc7c6f2e5c7fa935;p=thirdparty%2Fkernel%2Fstable.git thinkpad-acpi: fix issuing duplicated key events for brightness up/down commit ff413195e830541afeae469fc866ecd0319abd7e upstream. 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 Signed-off-by: Matthew Garrett Cc: Andreas Sturmlechner Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index f08aee680f0a7..aa232de6d48d0 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3402,7 +3402,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) /* Do not issue duplicate brightness change events to * userspace. tpacpi_detect_brightness_capabilities() must have * been called before this point */ - if (tp_features.bright_acpimode && acpi_video_backlight_support()) { + if (acpi_video_backlight_support()) { pr_info("This ThinkPad has standard ACPI backlight " "brightness control, supported by the ACPI " "video driver\n");