Commit d4afc775 authored by Rene Bollford's avatar Rene Bollford Committed by 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: default avatarRene Bolldorf <xsecute@googlemail.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment