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

backlight: gpio-backlight: Use backlight power constants

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: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240624152033.25016-6-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Thomas Zimmermann and committed by
Lee Jones
ef51815c e263c051

+4 -5
+4 -5
drivers/video/backlight/gpio_backlight.c
··· 5 5 6 6 #include <linux/backlight.h> 7 7 #include <linux/err.h> 8 - #include <linux/fb.h> 9 8 #include <linux/gpio/consumer.h> 10 9 #include <linux/init.h> 11 10 #include <linux/kernel.h> ··· 80 81 /* Set the initial power state */ 81 82 if (!of_node || !of_node->phandle) 82 83 /* Not booted with device tree or no phandle link to the node */ 83 - bl->props.power = def_value ? FB_BLANK_UNBLANK 84 - : FB_BLANK_POWERDOWN; 84 + bl->props.power = def_value ? BACKLIGHT_POWER_ON 85 + : BACKLIGHT_POWER_OFF; 85 86 else if (gpiod_get_value_cansleep(gbl->gpiod) == 0) 86 - bl->props.power = FB_BLANK_POWERDOWN; 87 + bl->props.power = BACKLIGHT_POWER_OFF; 87 88 else 88 - bl->props.power = FB_BLANK_UNBLANK; 89 + bl->props.power = BACKLIGHT_POWER_ON; 89 90 90 91 bl->props.brightness = 1; 91 92