From: Hans de Goede Date: Tue, 16 Jun 2015 14:28:10 +0000 (+0200) Subject: thinkpad-acpi: Port to new backlight interface selection API X-Git-Tag: v4.2-rc1~150^2~10^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b33c6ce5f2987184dcc444d05d0f5a7227ce431e;p=karo-tx-linux.git thinkpad-acpi: Port to new backlight interface selection API Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede Acked-by: Henrique de Moraes Holschuh Acked-by: Darren Hart Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 28f328136f0d..33e488cf5569 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -83,6 +83,7 @@ #include #include #include +#include /* ThinkPad CMOS commands */ #define TP_CMOS_VOLUME_DOWN 0 @@ -3487,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_backlight_support()) { + if (acpi_video_get_backlight_type() != acpi_backlight_vendor) { pr_info("This ThinkPad has standard ACPI backlight " "brightness control, supported by the ACPI " "video driver\n"); @@ -6491,7 +6492,7 @@ static int __init brightness_init(struct ibm_init_struct *iibm) return 1; } - if (acpi_video_backlight_support()) { + if (acpi_video_get_backlight_type() != acpi_backlight_vendor) { if (brightness_enable > 1) { pr_info("Standard ACPI backlight interface " "available, not loading native one\n");