mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
7f496cfd6b
commit
ef1ea03d75
1 changed files with 2 additions and 4 deletions
|
@ -83,8 +83,7 @@ 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);
|
||||
gpiod_set_value_cansleep(ddata->enable_gpio, 1);
|
||||
|
||||
if (gpio_is_valid(ddata->backlight_gpio))
|
||||
gpio_set_value_cansleep(ddata->backlight_gpio, 1);
|
||||
|
@ -105,8 +104,7 @@ 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);
|
||||
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
|
||||
|
||||
in->ops.dpi->disable(in);
|
||||
|
||||
|
|
Loading…
Reference in a new issue