summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorRene Bollford <xsecute@googlemail.com>2011-10-23 09:56:42 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-18 07:31:54 -0800
commit910fc79f722372dcc17ff3c53e1f2191c0cf816c (patch)
tree4c9994d24aca2f6d33a1375817d30c3c37500d40 /drivers/platform
parentc4e7f9022e506c6635a5037713c37118e23193e4 (diff)
ideapad: Check if acpi already handle backlight power to avoid a page fault
commit d4afc7754a60b885b63ef23fd194984e2d53a4e6 upstream. 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> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Tested-by: Artem X <artem.brz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/ideapad-laptop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 0c595410e788..0d94eec00f4d 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -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;