X86 platform drivers
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: stable@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org,
	Artem X <artem.brz@gmail.com>,
	Rene Bolldorf <xsecute@googlemail.com>,
	Matthew Garrett <mjg@redhat.com>,
	Ike Panhc <ike.pan@canonical.com>,
	Corentin Chary <corentin.chary@gmail.com>
Subject: [PATCH linux-3.1.y] ideapad: Check if acpi already handle backlight power to avoid a page fault
Date: Tue, 10 Jan 2012 18:42:56 -0600	[thread overview]
Message-ID: <20120111004256.GS22184@burratino> (raw)
In-Reply-To: <CAFVLVSOp750X4L+qgR16Qc53V+jOKsxA-ujskx3K0BX9kQOzTw@mail.gmail.com>

From: René Bollford <xsecute@googlemail.com>
Date: Sun, 23 Oct 2011 09:56:42 +0200

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>
---
Artem X wrote:

> I've compiled vanilla 3.1.6 with that patch and turning off blacklight
> was working.

This fixes an oops reported by a few people in the new ideapad-laptop
backlight driver.  See:

 - http://thread.gmane.org/gmane.linux.kernel/1205259
 - http://thread.gmane.org/gmane.linux.drivers.platform.x86.devel/2405
 - http://bugs.debian.org/655377

Luckily the ideapad-laptop backlight driver was introduced in
v3.1-rc1~14^2~29, so older kernels do not have this bug.  Fix is
already included in v3.2.

 drivers/platform/x86/ideapad-laptop.c |    2 ++
 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;
-- 
1.7.8.3

       reply	other threads:[~2012-01-11  0:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFVLVSOp750X4L+qgR16Qc53V+jOKsxA-ujskx3K0BX9kQOzTw@mail.gmail.com>
2012-01-11  0:42 ` Jonathan Nieder [this message]
2012-01-11  0:56   ` [PATCH linux-3.1.y] ideapad: Check if acpi already handle backlight power to avoid a page fault Jonathan Nieder
2012-01-11 11:47   ` Ike Panhc
2012-01-11 16:11     ` Greg KH
2012-01-11 16:40       ` Jonathan Nieder
2012-01-11 17:05         ` Greg KH
2012-01-11 18:57           ` Jonathan Nieder
2012-01-12 22:59   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120111004256.GS22184@burratino \
    --to=jrnieder@gmail.com \
    --cc=artem.brz@gmail.com \
    --cc=corentin.chary@gmail.com \
    --cc=ike.pan@canonical.com \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=xsecute@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox