Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 756b918d authored by Fabio Estevam's avatar Fabio Estevam Committed by Thierry Reding
Browse files

drm/panel: simple: Remove unneeded gpiod NULL check



The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1500249939-8075-1-git-send-email-festevam@gmail.com
parent f3621a8e
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -187,7 +187,6 @@ static int panel_simple_unprepare(struct drm_panel *panel)
	if (!p->prepared)
	if (!p->prepared)
		return 0;
		return 0;


	if (p->enable_gpio)
	gpiod_set_value_cansleep(p->enable_gpio, 0);
	gpiod_set_value_cansleep(p->enable_gpio, 0);


	regulator_disable(p->supply);
	regulator_disable(p->supply);
@@ -214,7 +213,6 @@ static int panel_simple_prepare(struct drm_panel *panel)
		return err;
		return err;
	}
	}


	if (p->enable_gpio)
	gpiod_set_value_cansleep(p->enable_gpio, 1);
	gpiod_set_value_cansleep(p->enable_gpio, 1);


	if (p->desc->delay.prepare)
	if (p->desc->delay.prepare)