1
0
Fork 0

[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: Rene Bolldorf <xsecute@googlemail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
hifive-unleashed-5.1
Rene Bollford 2011-10-23 09:56:42 +02:00 committed by Matthew Garrett
parent 1709adab07
commit d4afc7754a
1 changed files with 2 additions and 0 deletions

View File

@ -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;