From: Hans de Goede Date: Tue, 22 Dec 2015 18:09:50 +0000 (+0100) Subject: thinkpad_acpi: Use acpi_video_handles_brightness_key_presses() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7714687a2b2d4afcfac8c3bcc99ace16efa98882;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git thinkpad_acpi: Use acpi_video_handles_brightness_key_presses() Use the new acpi_video_handles_brightness_key_presses function to check if we should report brightness key-presses. This makes the code both easier to read and makes it properly report key-presses when acpi-video is not reporting them for reasons other then the backlight type being vendor. Signed-off-by: Hans de Goede Acked-by: Henrique de Moraes Holschuh Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 0bed4733c4f0..f453d5dc085e 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3488,7 +3488,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 (acpi_video_get_backlight_type() != acpi_backlight_vendor) { + if (acpi_video_handles_brightness_key_presses()) { pr_info("This ThinkPad has standard ACPI backlight " "brightness control, supported by the ACPI " "video driver\n");