ACPI video: no warning message if "acpi_backlight=vendor" is used
authorZhang Rui <rui.zhang@intel.com>
Mon, 13 Jul 2009 02:33:24 +0000 (10:33 +0800)
committerLen Brown <len.brown@intel.com>
Wed, 30 Dec 2009 06:46:12 +0000 (01:46 -0500)
AML code always sends notifications to ACPI video device,
even if we disable the ACPI backlight control by using
boot option "acpi_backlight=vendor".

In this case we should not print any warning message.
http://bugzilla.kernel.org/show_bug.cgi?id=13671#c14

Sigend-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/video.c

index 05dff631591c943918749aee95d86c474c781c62..3b063a6ac52ea38f7cc9bce45a4e8fb98cf32035 100644 (file)
@@ -1979,6 +1979,10 @@ acpi_video_switch_brightness(struct acpi_video_device *device, int event)
        unsigned long long level_current, level_next;
        int result = -EINVAL;
 
+       /* no warning message if acpi_backlight=vendor is used */
+       if (!acpi_video_backlight_support())
+               return 0;
+
        if (!device->brightness)
                goto out;