toshiba-acpi: Port to new backlight interface selection API
authorHans de Goede <hdegoede@redhat.com>
Tue, 16 Jun 2015 14:28:11 +0000 (16:28 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 18 Jun 2015 23:12:41 +0000 (01:12 +0200)
Port the backlight selection logic to the new backlight interface
selection API.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Azael Avalos <coproscefalo@gmail.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/platform/x86/toshiba_acpi.c

index 9956b9902bb40aaeb59e724b60579e56a495795e..59bf27ed72d63a1e7d1fa253452081277473d5ee 100644 (file)
@@ -2640,14 +2640,11 @@ static int toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev)
         */
        if (dev->tr_backlight_supported ||
            dmi_check_system(toshiba_vendor_backlight_dmi))
-               acpi_video_dmi_promote_vendor();
+               acpi_video_set_dmi_backlight_type(acpi_backlight_vendor);
 
-       if (acpi_video_backlight_support())
+       if (acpi_video_get_backlight_type() != acpi_backlight_vendor)
                return 0;
 
-       /* acpi-video may have loaded before we called dmi_promote_vendor() */
-       acpi_video_unregister_backlight();
-
        memset(&props, 0, sizeof(props));
        props.type = BACKLIGHT_PLATFORM;
        props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1;