platform/x86: fujitsu-laptop: account for backlight power when determining brightness
authorMichał Kępień <kernel@kempniu.pl>
Wed, 5 Apr 2017 06:49:09 +0000 (08:49 +0200)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 13 Apr 2017 17:16:07 +0000 (10:16 -0700)
commit5959ddd02be4e435da866ee065187f5c8bccea28
tree4f780c19b952940d783fdc501ab6d9cd6cc4b8c6
parentd75a4a972ad1ed6d1326c63ae2fb0f9586161b4d
platform/x86: fujitsu-laptop: account for backlight power when determining brightness

The comment for the get_brightness backlight device callback in
include/linux/backlight.h states that it should "return the current
backlight brightness (accounting for power, fb_blank etc.)".
fujitsu-laptop violates that premise by simply returning the value to
which ACPI function GBLL evaluates to.  Make sure 0 is returned when
backlight power is turned off.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/fujitsu-laptop.c