diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-08 21:53:09 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-08 21:53:09 +0300 |
commit | 667ae4ee6c29c7ea261d53d3ecc016026d9c2a9a (patch) | |
tree | 091de6f263c1764c032d41c958370e3bfcd82225 /drivers/acpi/video.c | |
parent | 35d0565b95547ec12d025dc9b1394f22968d113d (diff) | |
parent | dce4ec2e452fddb7542b5fc15d0e6b8531f6d5eb (diff) | |
download | linux-667ae4ee6c29c7ea261d53d3ecc016026d9c2a9a.tar.xz |
Merge back earlier ACPI backlight material for 3.19-rc1.
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 9d75ead2a1f9..185a57d13723 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -1681,6 +1681,19 @@ static void acpi_video_dev_register_backlight(struct acpi_video_device *device) printk(KERN_ERR PREFIX "Create sysfs link\n"); } +static void acpi_video_run_bcl_for_osi(struct acpi_video_bus *video) +{ + struct acpi_video_device *dev; + union acpi_object *levels; + + mutex_lock(&video->device_list_lock); + list_for_each_entry(dev, &video->video_device_list, entry) { + if (!acpi_video_device_lcd_query_levels(dev, &levels)) + kfree(levels); + } + mutex_unlock(&video->device_list_lock); +} + static int acpi_video_bus_register_backlight(struct acpi_video_bus *video) { struct acpi_video_device *dev; @@ -1688,6 +1701,8 @@ static int acpi_video_bus_register_backlight(struct acpi_video_bus *video) if (video->backlight_registered) return 0; + acpi_video_run_bcl_for_osi(video); + if (!acpi_video_verify_backlight_support()) return 0; |