Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933542AbaFIJRh (ORCPT ); Mon, 9 Jun 2014 05:17:37 -0400 Received: from ip4-83-240-18-248.cust.nbox.cz ([83.240.18.248]:58415 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754852AbaFIIvY (ORCPT ); Mon, 9 Jun 2014 04:51:24 -0400 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aaron Lu , "Rafael J. Wysocki" , Jiri Slaby Subject: [PATCH 3.12 010/146] ACPI / video: Fix initial level validity test Date: Mon, 9 Jun 2014 10:49:05 +0200 Message-Id: X-Mailer: git-send-email 1.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aaron Lu 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 Signed-off-by: Rafael J. Wysocki Signed-off-by: Jiri Slaby --- 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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/