summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/video/fbdev/omap2/displays-new/panel-dpi.c')
-rw-r--r--kernel/drivers/video/fbdev/omap2/displays-new/panel-dpi.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/kernel/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/kernel/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
index eb8fd8140..f7be3489f 100644
--- a/kernel/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
+++ b/kernel/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
@@ -209,16 +209,9 @@ static int panel_dpi_probe_of(struct platform_device *pdev)
struct videomode vm;
struct gpio_desc *gpio;
- gpio = devm_gpiod_get(&pdev->dev, "enable");
-
- if (IS_ERR(gpio)) {
- if (PTR_ERR(gpio) != -ENOENT)
- return PTR_ERR(gpio);
- else
- gpio = NULL;
- } else {
- gpiod_direction_output(gpio, 0);
- }
+ gpio = devm_gpiod_get_optional(&pdev->dev, "enable", GPIOD_OUT_LOW);
+ if (IS_ERR(gpio))
+ return PTR_ERR(gpio);
ddata->enable_gpio = gpio;