提交 2d4128a2 编写于 作者: D Danny Baumann 提交者: Rafael J. Wysocki

ACPI / video: Make logic a little easier to understand.

Make code paths a little easier to follow, and don't needlessly continue
list iteration.
Signed-off-by: NDanny Baumann <dannybaumann@web.de>
Reviewed-by: NAaron Lu <aaron.lu@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 a89803df
......@@ -745,16 +745,17 @@ acpi_video_init_brightness(struct acpi_video_device *device)
*/
if (use_bios_initial_backlight) {
for (i = 2; i < br->count; i++)
if (level_old == br->levels[i])
if (level_old == br->levels[i]) {
level = level_old;
break;
}
}
goto set_level;
} else {
if (br->flags._BCL_reversed)
level_old = (br->count - 1) - level_old;
level = br->levels[level_old];
}
if (br->flags._BCL_reversed)
level_old = (br->count - 1) - level_old;
level = br->levels[level_old];
set_level:
result = acpi_video_device_lcd_set_level(device, level);
if (result)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册