Commit ef1ea03d authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Tomi Valkeinen

fbdev: omap2: panel-dpi: simplify gpio setting

gpiod_set_value_cansleep is a noop when the passed descriptor is NULL.
So there is no need to duplicate the check for NULL; just call the
function unconditionally instead.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 7f496cfd
......@@ -83,7 +83,6 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev)
if (r)
return r;
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 1);
if (gpio_is_valid(ddata->backlight_gpio))
......@@ -105,7 +104,6 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
if (gpio_is_valid(ddata->backlight_gpio))
gpio_set_value_cansleep(ddata->backlight_gpio, 0);
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
in->ops.dpi->disable(in);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment