summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTomasz Stanislawski <t.stanislaws@samsung.com>2013-10-15 16:40:07 +0200
committerChanho Park <chanho61.park@samsung.com>2014-03-20 17:43:46 +0900
commit0006bfe28c35fa7a167272d46e5e85dddd0c8bd7 (patch)
tree9838835735e19a1ef7e6c0573e15306d7290f74f /drivers
parent3b7f0894b9e1708305ebb0dea17add358afbc958 (diff)
downloadlinux-3.10-0006bfe28c35fa7a167272d46e5e85dddd0c8bd7.tar.gz
linux-3.10-0006bfe28c35fa7a167272d46e5e85dddd0c8bd7.tar.bz2
linux-3.10-0006bfe28c35fa7a167272d46e5e85dddd0c8bd7.zip
drm: exynos: hdmi: simplify extracting hpd-gpio from DT
This patch eliminates redundant checks while retrieving HPD gpio from DT during HDMI's probe(). Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Change-Id: I1f2312291bd7c2334783c8067889b95db305377f
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 9b52b4f853e..77f09ede7ea 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1857,24 +1857,18 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
{
struct device_node *np = dev->of_node;
struct s5p_hdmi_platform_data *pd;
- enum of_gpio_flags flags;
- u32 value;
pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
if (!pd)
- goto err_data;
+ return NULL;
- if (!of_find_property(np, "hpd-gpio", &value)) {
+ pd->hpd_gpio = of_get_named_gpio_flags(np, "hpd-gpio", 0, NULL);
+ if (pd->hpd_gpio < 0) {
DRM_ERROR("no hpd gpio property found\n");
- goto err_data;
+ return NULL;
}
- pd->hpd_gpio = of_get_named_gpio_flags(np, "hpd-gpio", 0, &flags);
-
return pd;
-
-err_data:
- return NULL;
}
#else
static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata