Skip to content

Commit

Permalink
[PATCH] ideapad: Check if acpi already handle backlight power to avoi…
Browse files Browse the repository at this point in the history
…d 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>
  • Loading branch information
Rene Bollford authored and Matthew Garrett committed Oct 24, 2011
1 parent 1709ada commit d4afc77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/platform/x86/ideapad-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d4afc77

Please sign in to comment.