From: Aaron Lu <[email protected]>

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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Jiri Slaby <[email protected]>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to