sony-laptop: warn on multiple KBD backlight handles
authorMattia Dongili <malattia@linux.it>
Tue, 29 Oct 2013 23:07:36 +0000 (08:07 +0900)
committerMatthew Garrett <matthew.garrett@nebula.com>
Wed, 20 Nov 2013 23:50:49 +0000 (18:50 -0500)
commit1d885f4257165563342acc6bc473b67d9b36a742
treeb8f837819a0fafdad9fe3bdaea052ef5798f5008
parent2bd4ac139259bb605fc0325a7dda33e2fbb67ae3
sony-laptop: warn on multiple KBD backlight handles

Some BIOS versions/Vaio models apparently ship with two nearly identical
functions to handle backlight related controls.
The only difference seems to be:
        If (LEqual (BUF1, 0x40))
        {
            Store (0x40, P80H)
            Store (BUF2, Local0)
-           And (Local0, One, Local0)
+           And (Local0, 0x03, Local0)
            Store (Local0, ^^H_EC.KLPC)
        }

Avoid erroring out on initialization and messing things up on cleanup
for now since we never call into these methods with anything different
than 1 or 0.
This issue was found on a Sony VPCSE1V9E/BIOS R2087H4.

Cc: Marco Krüger <krgsch@gmail.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/sony-laptop.c