Commit e1e6a6a8 authored by Aaron Lu's avatar Aaron Lu Committed by Jiri Slaby

ACPI / video: Fix initial level validity test

commit 9efa5e50 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: default avatarAaron Lu <aaron.lu@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent f1559592
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment