lkml.org 
[lkml]   [2014]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3.12 010/146] ACPI / video: Fix initial level validity test
Date
From: Aaron Lu <aaron.lu@intel.com>

3.12-stable review patch. If anyone has any objections, please let me know.

===============

commit 9efa5e50598c5568b0678bb411b239a0b6e9a328 upstream.

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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
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 5708e44376fe..d2e069044a0f 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -836,7 +836,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)
level = max_level;
--
1.9.3


\
 
 \ /
  Last update: 2014-06-09 12:41    [W:1.059 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site