Commit 537c7933 authored by Stephen Kitt's avatar Stephen Kitt Committed by Hans de Goede

platform/x86: compal-laptop: Use backlight helper

Instead of manually checking the power state in struct
backlight_properties, use backlight_is_blank().
Signed-off-by: default avatarStephen Kitt <steve@sk2.org>
Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20220607184635.1127913-4-steve@sk2.orgReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 3096ab5b
......@@ -324,9 +324,7 @@ static int bl_update_status(struct backlight_device *b)
if (ret)
return ret;
set_backlight_state((b->props.power == FB_BLANK_UNBLANK)
&& !(b->props.state & BL_CORE_SUSPENDED)
&& !(b->props.state & BL_CORE_FBBLANK));
set_backlight_state(!backlight_is_blank(b));
return 0;
}
......
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