summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panel
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-07-16 21:05:39 -0300
committerThierry Reding <treding@nvidia.com>2017-08-18 17:10:45 +0200
commit756b918d0df3a0945fe8bcca434b58573cdddc29 (patch)
treef262c8a96c6e38e912087d70ca8b43e678b84911 /drivers/gpu/drm/panel
parentf3621a8eb59a913612c8e6e37d81f16b649f8b6c (diff)
downloadtalos-obmc-linux-756b918d0df3a0945fe8bcca434b58573cdddc29.tar.gz
talos-obmc-linux-756b918d0df3a0945fe8bcca434b58573cdddc29.zip
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: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://patchwork.freedesktop.org/patch/msgid/1500249939-8075-1-git-send-email-festevam@gmail.com
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 44756853aa0e..a3c96d2ea41c 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -187,8 +187,7 @@ static int panel_simple_unprepare(struct drm_panel *panel)
if (!p->prepared)
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);
@@ -214,8 +213,7 @@ static int panel_simple_prepare(struct drm_panel *panel)
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)
msleep(p->desc->delay.prepare);
OpenPOWER on IntegriCloud