Skip to content

Commit

Permalink
ACPI / video: Fix initial level validity test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aaron Lu authored and Rafael J. Wysocki committed Nov 7, 2013
1 parent f0eb2e5 commit 9efa5e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9efa5e5

Please sign in to comment.