Skip to content

Commit ef51815

Browse files
Thomas Zimmermannlag-linaro
authored andcommitted
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 <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent e263c05 commit ef51815

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/video/backlight/gpio_backlight.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#include <linux/backlight.h>
77
#include <linux/err.h>
8-
#include <linux/fb.h>
98
#include <linux/gpio/consumer.h>
109
#include <linux/init.h>
1110
#include <linux/kernel.h>
@@ -81,12 +80,12 @@ static int gpio_backlight_probe(struct platform_device *pdev)
8180
/* Set the initial power state */
8281
if (!of_node || !of_node->phandle)
8382
/* Not booted with device tree or no phandle link to the node */
84-
bl->props.power = def_value ? FB_BLANK_UNBLANK
85-
: FB_BLANK_POWERDOWN;
83+
bl->props.power = def_value ? BACKLIGHT_POWER_ON
84+
: BACKLIGHT_POWER_OFF;
8685
else if (gpiod_get_value_cansleep(gbl->gpiod) == 0)
87-
bl->props.power = FB_BLANK_POWERDOWN;
86+
bl->props.power = BACKLIGHT_POWER_OFF;
8887
else
89-
bl->props.power = FB_BLANK_UNBLANK;
88+
bl->props.power = BACKLIGHT_POWER_ON;
9089

9190
bl->props.brightness = 1;
9291

0 commit comments

Comments
 (0)