These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / platform / x86 / thinkpad_acpi.c
index 28f3281..0bed473 100644 (file)
@@ -83,6 +83,7 @@
 #include <sound/control.h>
 #include <sound/initval.h>
 #include <asm/uaccess.h>
+#include <acpi/video.h>
 
 /* ThinkPad CMOS commands */
 #define TP_CMOS_VOLUME_DOWN    0
@@ -401,7 +402,7 @@ static const char *str_supported(int is_supported);
 #else
 static inline const char *str_supported(int is_supported) { return ""; }
 #define vdbg_printk(a_dbg_level, format, arg...)       \
-       no_printk(format, ##arg)
+       do { if (0) no_printk(format, ##arg); } while (0)
 #endif
 
 static void tpacpi_log_usertask(const char * const what)
@@ -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");
@@ -6458,8 +6459,7 @@ static void __init tpacpi_detect_brightness_capabilities(void)
                pr_info("detected a 8-level brightness capable ThinkPad\n");
                break;
        default:
-               pr_err("Unsupported brightness interface, "
-                      "please contact %s\n", TPACPI_MAIL);
+               pr_info("Unsupported brightness interface\n");
                tp_features.bright_unkfw = 1;
                bright_maxlvl = b - 1;
        }
@@ -6491,7 +6491,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");