提交 d4afc775 编写于 作者: R Rene Bollford 提交者: Matthew Garrett

[PATCH] ideapad: Check if acpi already handle backlight power to avoid a page fault

This patch avoid a page fault in the ideapad-laptop extras when
turning the backlight power on or off.
Signed-off-by: NRene Bolldorf <xsecute@googlemail.com>
Signed-off-by: NMatthew Garrett <mjg@redhat.com>
上级 1709adab
......@@ -493,6 +493,8 @@ static void ideapad_backlight_notify_power(struct ideapad_private *priv)
unsigned long power;
struct backlight_device *blightdev = priv->blightdev;
if (!blightdev)
return;
if (read_ec_data(ideapad_handle, 0x18, &power))
return;
blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册