drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio
authorManikandan Muralidharan <manikandan.m@microchip.com>
Mon, 1 Jul 2024 08:58:36 +0000 (14:28 +0530)
committerNeil Armstrong <neil.armstrong@linaro.org>
Tue, 9 Jul 2024 12:45:54 +0000 (14:45 +0200)
Switch the driver to use devm_gpiod_get_optional() on reset_gpio to avoid
driver probe issues when reset line is not specified.

Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240701085837.50855-3-manikandan.m@microchip.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240701085837.50855-3-manikandan.m@microchip.com
drivers/gpu/drm/panel/panel-himax-hx8394.c

index cb9f46e853de47fbb1474df7bae0939b2789531d..3be461fc5615bc688c12b3afc554914df1a561ef 100644 (file)
@@ -486,7 +486,7 @@ static int hx8394_probe(struct mipi_dsi_device *dsi)
        if (!ctx)
                return -ENOMEM;
 
-       ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
+       ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
        if (IS_ERR(ctx->reset_gpio))
                return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
                                     "Failed to get reset gpio\n");