Skip to content

Commit fe1328b

Browse files
Ying Liulag-linaro
authored andcommitted
backlight: gpio_backlight: Drop output GPIO direction check for initial power state
So, let's drop output GPIO direction check and only check GPIO value to set the initial power state. Fixes: 706dc68 ("backlight: gpio: Explicitly set the direction of the GPIO") Signed-off-by: Liu Ying <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 5145531 commit fe1328b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/video/backlight/gpio_backlight.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ static int gpio_backlight_probe(struct platform_device *pdev)
8787
/* Not booted with device tree or no phandle link to the node */
8888
bl->props.power = def_value ? FB_BLANK_UNBLANK
8989
: FB_BLANK_POWERDOWN;
90-
else if (gpiod_get_direction(gbl->gpiod) == 0 &&
91-
gpiod_get_value_cansleep(gbl->gpiod) == 0)
90+
else if (gpiod_get_value_cansleep(gbl->gpiod) == 0)
9291
bl->props.power = FB_BLANK_POWERDOWN;
9392
else
9493
bl->props.power = FB_BLANK_UNBLANK;

0 commit comments

Comments
 (0)