Skip to content

Commit 899dbfb

Browse files
Thomas Zimmermannlag-linaro
authored andcommitted
auxdisplay: ht16k33: Replace use of fb_blank with backlight helper
Replace the use of struct backlight_properties.fb_blank with a call to backlight_get_brightness(). The helper implements similar logic as the driver's function. It also accounts for BL_CORE_SUSPENDED for drivers that set BL_CORE_SUSPENDRESUME. Ht16k33 doesn't use this, so there's no change in behaviour here. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Robin van der Gracht <[email protected]> Cc: Miguel Ojeda <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Reviewed-by: Robin van der Gracht <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 4cece76 commit 899dbfb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/auxdisplay/ht16k33.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,9 @@ static int ht16k33_initialize(struct ht16k33_priv *priv)
284284

285285
static int ht16k33_bl_update_status(struct backlight_device *bl)
286286
{
287-
int brightness = bl->props.brightness;
287+
const int brightness = backlight_get_brightness(bl);
288288
struct ht16k33_priv *priv = bl_get_data(bl);
289289

290-
if (bl->props.power != FB_BLANK_UNBLANK ||
291-
bl->props.fb_blank != FB_BLANK_UNBLANK ||
292-
bl->props.state & BL_CORE_FBBLANK)
293-
brightness = 0;
294-
295290
return ht16k33_brightness_set(priv, brightness);
296291
}
297292

0 commit comments

Comments
 (0)