]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dell-laptop: Port to new backlight interface selection API
authorHans de Goede <hdegoede@redhat.com>
Tue, 16 Jun 2015 14:28:00 +0000 (16:28 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 18 Jun 2015 23:11:46 +0000 (01:11 +0200)
Port the backlight selection logic to the new backlight interface
selection API.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/platform/x86/dell-laptop.c

index d688d806a8a51d9845ab9c5c5bc3322e748738f3..01d081052b508b795580cfec441fa0f8201b7d75 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/slab.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
+#include <acpi/video.h>
 #include "../../firmware/dcdbas.h"
 
 #define BRIGHTNESS_TOKEN 0x7d
@@ -1920,13 +1921,8 @@ static int __init dell_init(void)
                debugfs_create_file("rfkill", 0444, dell_laptop_dir, NULL,
                                    &dell_debugfs_fops);
 
-#ifdef CONFIG_ACPI
-       /* In the event of an ACPI backlight being available, don't
-        * register the platform controller.
-        */
-       if (acpi_video_backlight_support())
+       if (acpi_video_get_backlight_type() != acpi_backlight_vendor)
                return 0;
-#endif
 
        get_buffer();
        buffer->input[0] = find_token_location(BRIGHTNESS_TOKEN);