diff options
Diffstat (limited to 'drivers/video/fbdev/omap2/displays-new/encoder-opa362.c')
-rw-r--r-- | drivers/video/fbdev/omap2/displays-new/encoder-opa362.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c b/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c index 84a6b3367124..a14d993f719d 100644 --- a/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c +++ b/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c @@ -201,15 +201,9 @@ static int opa362_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ddata); - gpio = devm_gpiod_get(&pdev->dev, "enable"); - if (IS_ERR(gpio)) { - if (PTR_ERR(gpio) != -ENOENT) - return PTR_ERR(gpio); - - 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; |