diff mbox

[1/2] ACPI / video: Fix initial level validity test

Message ID 52799553.7020406@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Aaron Lu Nov. 6, 2013, 1:03 a.m. UTC
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(-)

Comments

Rafael J. Wysocki Nov. 6, 2013, 10:03 p.m. UTC | #1
On Wednesday, November 06, 2013 09:03:15 AM Aaron Lu wrote:
> 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>

Any pointers to bug reports, BZ entries, etc?

> ---
>  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;
>
Aaron Lu Nov. 7, 2013, 12:25 a.m. UTC | #2
On 11/07/2013 06:03 AM, Rafael J. Wysocki wrote:
> On Wednesday, November 06, 2013 09:03:15 AM Aaron Lu wrote:
>> 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>
> 
> Any pointers to bug reports, BZ entries, etc?

This patch doesn't solve any bugs, I found the problem while preparing
patch 2/2. Now I remembered some stable rule that patch that solves a
potential bug isn't acceptable, so the stable tag should be dropped.

Thanks,
Aaron

> 
>> ---
>>  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;
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;