[PATCH] backlight: Use backlight helper

Daniel Thompson daniel.thompson at linaro.org
Thu Jun 9 00:48:10 AEST 2022


^^^
Subject seems a bit generic...

On Tue, Jun 07, 2022 at 08:34:11PM +0200, Stephen Kitt wrote:
> diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c
> index 2194016122d2..c2d87e7fa85b 100644
> --- a/drivers/macintosh/via-pmu-backlight.c
> +++ b/drivers/macintosh/via-pmu-backlight.c
> @@ -71,12 +71,7 @@ static int pmu_backlight_get_level_brightness(int level)
>  static int __pmu_backlight_update_status(struct backlight_device *bd)
>  {
>  	struct adb_request req;
> -	int level = bd->props.brightness;
> -
> -
> -	if (bd->props.power != FB_BLANK_UNBLANK ||
> -	    bd->props.fb_blank != FB_BLANK_UNBLANK)
> -		level = 0;
> +	int level = backlight_get_brightness(bd);

Other than that LGTM.


Daniel.


More information about the Linuxppc-dev mailing list