[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1332233594-13099-15-git-send-email-corentin.chary@gmail.com>
Date: Tue, 20 Mar 2012 09:53:14 +0100
From: Corentin Chary <corentin.chary@...il.com>
To: Matthew Garrett <mjg@...hat.com>
Cc: platform-driver-x86@...r.kernel.org,
Corentin Chary <corentin.chary@...il.com>,
Corentin Chary <corentincj@...aif.net>,
acpi4asus-user@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: [PATCH 14/14] asus-wmi: don't update power and brightness when using scalar
But we can still do it on other boards, as this might happen
if the backlight driver change when update_bl is called.
Signed-off-by: Corentin Chary <corentin.chary@...il.com>
---
drivers/platform/x86/asus-wmi.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index ff9cfd8..7d1684b 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1152,15 +1152,21 @@ static int update_bl_status(struct backlight_device *bd)
ctrl_param, NULL);
if (asus->driver->quirks->store_backlight_power)
asus->driver->panel_power = bd->props.power;
- } else {
- if (asus->driver->quirks->scalar_panel_brightness)
- ctrl_param = get_scalar_command(bd);
- else
- ctrl_param = bd->props.brightness;
- err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BRIGHTNESS,
- ctrl_param, NULL);
+ /* When using scalar brightness, updating the brightness
+ * will mess with the backlight power */
+ if (asus->driver->quirks->scalar_panel_brightness)
+ return err;
}
+
+ if (asus->driver->quirks->scalar_panel_brightness)
+ ctrl_param = get_scalar_command(bd);
+ else
+ ctrl_param = bd->props.brightness;
+
+ err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BRIGHTNESS,
+ ctrl_param, NULL);
+
return err;
}
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists