]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
asus-wmi: fix keyboard backlight detection
authorCorentin Chary <corentin.chary@gmail.com>
Fri, 1 Jul 2011 09:34:34 +0000 (11:34 +0200)
committerMatthew Garrett <mjg@redhat.com>
Mon, 11 Jul 2011 13:43:25 +0000 (09:43 -0400)
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/asus-wmi.c

index 2d573bd501b4c1046e0717605b097c74120bf9e5..1e08366f135dbfbd9194f8b03f366ef5d6c59f37 100644 (file)
@@ -395,8 +395,9 @@ static int kbd_led_read(struct asus_wmi *asus, int *level, int *env)
        retval = asus_wmi_get_devstate_bits(asus, ASUS_WMI_DEVID_KBD_BACKLIGHT,
                                            0xFFFF);
 
+       /* Unknown status is considered as off */
        if (retval == 0x8000)
-               retval = -ENODEV;
+               retval = 0;
 
        if (retval >= 0) {
                if (level)