ACPI / video: Fix initial level validity test

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>
This commit is contained in:
Aaron Lu 2013-11-06 09:03:15 +08:00 committed by Rafael J. Wysocki
parent f0eb2e5dc0
commit 9efa5e5059

View file

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