Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <tzimmermann@suse.de>
Cc: Robin van der Gracht <robin@protonic.nl>
Cc: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Robin van der Gracht <robin@protonic.nl>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240319093915.31778-2-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Thomas Zimmermann and committed by
Lee Jones
899dbfb2 4cece764

+1 -6
+1 -6
drivers/auxdisplay/ht16k33.c
··· 284 284 285 285 static int ht16k33_bl_update_status(struct backlight_device *bl) 286 286 { 287 - int brightness = bl->props.brightness; 287 + const int brightness = backlight_get_brightness(bl); 288 288 struct ht16k33_priv *priv = bl_get_data(bl); 289 - 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 289 295 290 return ht16k33_brightness_set(priv, brightness); 296 291 }