diff options
author | Corentin Chary <corentin.chary@gmail.com> | 2012-03-20 04:53:14 -0400 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2012-03-26 15:05:51 -0400 |
commit | ade28abdcb474531bb7045c032a286812c7f6d2a (patch) | |
tree | dfd441bfc42ff2d6b30a8e274491801d908e5951 /drivers/platform | |
parent | 7a61d0207465e41b7dbe3a25f628ddef24572c6f (diff) |
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@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | 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 ff9cfd83b09f..7d1684bdbf63 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) | |||
1152 | ctrl_param, NULL); | 1152 | ctrl_param, NULL); |
1153 | if (asus->driver->quirks->store_backlight_power) | 1153 | if (asus->driver->quirks->store_backlight_power) |
1154 | asus->driver->panel_power = bd->props.power; | 1154 | asus->driver->panel_power = bd->props.power; |
1155 | } else { | ||
1156 | if (asus->driver->quirks->scalar_panel_brightness) | ||
1157 | ctrl_param = get_scalar_command(bd); | ||
1158 | else | ||
1159 | ctrl_param = bd->props.brightness; | ||
1160 | 1155 | ||
1161 | err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BRIGHTNESS, | 1156 | /* When using scalar brightness, updating the brightness |
1162 | ctrl_param, NULL); | 1157 | * will mess with the backlight power */ |
1158 | if (asus->driver->quirks->scalar_panel_brightness) | ||
1159 | return err; | ||
1163 | } | 1160 | } |
1161 | |||
1162 | if (asus->driver->quirks->scalar_panel_brightness) | ||
1163 | ctrl_param = get_scalar_command(bd); | ||
1164 | else | ||
1165 | ctrl_param = bd->props.brightness; | ||
1166 | |||
1167 | err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BRIGHTNESS, | ||
1168 | ctrl_param, NULL); | ||
1169 | |||
1164 | return err; | 1170 | return err; |
1165 | } | 1171 | } |
1166 | 1172 | ||