]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
backlight: pwm-backlight: Use backlight power constants
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 24 Jun 2024 15:20:10 +0000 (17:20 +0200)
committerLee Jones <lee@kernel.org>
Thu, 4 Jul 2024 15:45:25 +0000 (16:45 +0100)
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240624152033.25016-16-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/video/backlight/pwm_bl.c

index 61d30bc98eea55ad510705199db76f701e8537f1..e942908d1275fe380c9e74f7a39ac26771ecf027 100644 (file)
@@ -426,7 +426,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb)
 
        /* Not booted with device tree or no phandle link to the node */
        if (!node || !node->phandle)
-               return FB_BLANK_UNBLANK;
+               return BACKLIGHT_POWER_ON;
 
        /*
         * If the driver is probed from the device tree and there is a
@@ -434,7 +434,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb)
         * assume that another driver will enable the backlight at the
         * appropriate time. Therefore, if it is disabled, keep it so.
         */
-       return active ? FB_BLANK_UNBLANK: FB_BLANK_POWERDOWN;
+       return active ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
 }
 
 static int pwm_backlight_probe(struct platform_device *pdev)