[PATCH 15/15] backlight: backlight: Drop the deprecated fb_blank property

Stephen Kitt steve at sk2.org
Sun Jan 8 19:32:46 UTC 2023


On Sat, 07 Jan 2023 19:26:29 +0100, Sam Ravnborg via B4 Submission Endpoint
<devnull+sam.ravnborg.org at kernel.org> wrote:

> From: Sam Ravnborg <sam at ravnborg.org>
> 
> With all users gone remove the deprecated fb_blank member in
> backlight_properties.
> 
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Daniel Thompson <daniel.thompson at linaro.org>
> Cc: Jingoo Han <jingoohan1 at gmail.com>
> ---
>  drivers/video/backlight/backlight.c |  2 --
>  include/linux/backlight.h           | 22 ----------------------
>  2 files changed, 24 deletions(-)
> 
> diff --git a/drivers/video/backlight/backlight.c
> b/drivers/video/backlight/backlight.c index b788ff3d0f45..9b0557d094c5
> 100644 --- a/drivers/video/backlight/backlight.c
> +++ b/drivers/video/backlight/backlight.c
> @@ -118,14 +118,12 @@ static int fb_notifier_callback(struct notifier_block
> *self, bd->fb_bl_on[node] = true;
>  		if (!bd->use_count++) {
>  			bd->props.state &= ~BL_CORE_FBBLANK;
> -			bd->props.fb_blank = FB_BLANK_UNBLANK;
>  			backlight_update_status(bd);
>  		}
>  	} else if (fb_blank != FB_BLANK_UNBLANK && bd->fb_bl_on[node]) {
>  		bd->fb_bl_on[node] = false;
>  		if (!(--bd->use_count)) {
>  			bd->props.state |= BL_CORE_FBBLANK;
> -			bd->props.fb_blank = fb_blank;
>  			backlight_update_status(bd);
>  		}
>  	}
> diff --git a/include/linux/backlight.h b/include/linux/backlight.h
> index 614653e07e3a..c8622d6cc8c5 100644
> --- a/include/linux/backlight.h
> +++ b/include/linux/backlight.h
> @@ -218,25 +218,6 @@ struct backlight_properties {
>  	 */
>  	int power;
>  
> -	/**
> -	 * @fb_blank: The power state from the FBIOBLANK ioctl.
> -	 *
> -	 * When the FBIOBLANK ioctl is called @fb_blank is set to the
> -	 * blank parameter and the update_status() operation is called.
> -	 *
> -	 * When the backlight device is enabled @fb_blank is set
> -	 * to FB_BLANK_UNBLANK. When the backlight device is disabled
> -	 * @fb_blank is set to FB_BLANK_POWERDOWN.
> -	 *
> -	 * Backlight drivers should avoid using this property. It has been
> -	 * replaced by state & BL_CORE_FBLANK (although most drivers should
> -	 * use backlight_is_blank() as the preferred means to get the blank
> -	 * state).
> -	 *
> -	 * fb_blank is deprecated and will be removed.
> -	 */
> -	int fb_blank;
> -
>  	/**
>  	 * @type: The type of backlight supported.
>  	 *
> @@ -366,7 +347,6 @@ static inline int backlight_enable(struct
> backlight_device *bd) return 0;
>  
>  	bd->props.power = FB_BLANK_UNBLANK;
> -	bd->props.fb_blank = FB_BLANK_UNBLANK;
>  	bd->props.state &= ~BL_CORE_FBBLANK;
>  
>  	return backlight_update_status(bd);
> @@ -382,7 +362,6 @@ static inline int backlight_disable(struct
> backlight_device *bd) return 0;
>  
>  	bd->props.power = FB_BLANK_POWERDOWN;
> -	bd->props.fb_blank = FB_BLANK_POWERDOWN;
>  	bd->props.state |= BL_CORE_FBBLANK;
>  
>  	return backlight_update_status(bd);
> @@ -403,7 +382,6 @@ static inline int backlight_disable(struct
> backlight_device *bd) static inline bool backlight_is_blank(const struct
> backlight_device *bd) {
>  	return bd->props.power != FB_BLANK_UNBLANK ||
> -	       bd->props.fb_blank != FB_BLANK_UNBLANK ||
>  	       bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK);
>  }
>  
> 
> -- 
> 2.34.1

Reviewed-by: Stephen Kitt <steve at sk2.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230108/a81035ec/attachment.sig>


More information about the dri-devel mailing list