All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Danny Baumann <dannybaumann@web.de>,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>
Subject: [PATCH 1/2] ACPI / video: Fix initial level validity test
Date: Wed, 06 Nov 2013 09:03:15 +0800	[thread overview]
Message-ID: <52799553.7020406@intel.com> (raw)

When testing if the firmware's initial value is valid, we should use
the corrected level value instead of the raw value returned from
firmware.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Cc: Danny Baumann <dannybaumann@web.de>
Cc: stable <stable@kernel.org>
---
 drivers/acpi/video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 38c3a28d6392..bf521b36c2f9 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -856,7 +856,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
 		 * or an index). Set the backlight to max_level in this case.
 		 */
 		for (i = 2; i < br->count; i++)
-			if (level_old == br->levels[i])
+			if (level == br->levels[i])
 				break;
 		if (i == br->count)
 			level = max_level;
-- 
1.8.4.39.ga0d3f10

             reply	other threads:[~2013-11-06  1:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06  1:03 Aaron Lu [this message]
2013-11-06  1:07 ` [PATCH 2/2] ACPI / video: Quirk initial backlight level 0 Aaron Lu
2013-11-06  1:18   ` Aaron Lu
2013-11-06 22:04   ` Rafael J. Wysocki
2013-11-07  0:26     ` Aaron Lu
2013-11-06 22:03 ` [PATCH 1/2] ACPI / video: Fix initial level validity test Rafael J. Wysocki
2013-11-07  0:25   ` Aaron Lu

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=52799553.7020406@intel.com \
    --to=aaron.lu@intel.com \
    --cc=dannybaumann@web.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.