ACPI video: Still use ACPI backlight control if _DOS doesn't exist
authorZhang Rui <rui.zhang@intel.com>
Wed, 20 Jun 2012 01:48:43 +0000 (09:48 +0800)
committerLen Brown <len.brown@intel.com>
Sat, 30 Jun 2012 04:43:42 +0000 (00:43 -0400)
This fixes a regression in 3.4-rc1 caused by commit
ea9f8856bd6d4ed45885b06a338f7362cd6c60e5
(ACPI video: Harden video bus adding.)

Some platforms don't have _DOS control method, but the ACPI
backlight still works.
We should not invoke _DOS for these platforms.

https://bugzilla.kernel.org/show_bug.cgi?id=43168

Cc: Igor Murzov <intergalactic.anonymous@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/video.c

index 9577b6fa26507cad1db1f2ddf7d6f114abfdf513..4134b300b9cd1949b440c10aa70249a29c6e17e6 100644 (file)
@@ -558,6 +558,8 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
        union acpi_object arg0 = { ACPI_TYPE_INTEGER };
        struct acpi_object_list args = { 1, &arg0 };
 
+       if (!video->cap._DOS)
+               return 0;
 
        if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1)
                return -EINVAL;