Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-08-03 14:12:43 +0200
committerTakashi Iwai <tiwai@suse.de>2018-08-03 14:12:43 +0200
commite4462dd0275270e0a5e24c18594751471b43d194 (patch)
tree48eb84b0fe3f0e7e1949df482682e7fddd584a16
parentf13c35db71c392f4261cb9a0fb300727375949f3 (diff)
backlight: pwm_bl: Don't use GPIOF_* with gpiod_get_direction
(bsc#1051510). suse-commit: b690254715e3a2b1390c334af2bd4d2dc43890e1
-rw-r--r--drivers/video/backlight/pwm_bl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index ed9054ba3b40..abbdc2a5d4d1 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -301,14 +301,14 @@ static int pwm_backlight_probe(struct platform_device *pdev)
/*
* If the GPIO is not known to be already configured as output, that
- * is, if gpiod_get_direction returns either GPIOF_DIR_IN or -EINVAL,
- * change the direction to output and set the GPIO as active.
+ * is, if gpiod_get_direction returns either 1 or -EINVAL, change the
+ * direction to output and set the GPIO as active.
* Do not force the GPIO to active when it was already output as it
* could cause backlight flickering or we would enable the backlight too
* early. Leave the decision of the initial backlight state for later.
*/
if (pb->enable_gpio &&
- gpiod_get_direction(pb->enable_gpio) != GPIOF_DIR_OUT)
+ gpiod_get_direction(pb->enable_gpio) != 0)
gpiod_direction_output(pb->enable_gpio, 1);
pb->power_supply = devm_regulator_get(&pdev->dev, "power");