diff mbox

[PATCHv3,2/5] drm: exynos: hdmi: simplify extracting hpd-gpio from DT

Message ID 1397661178-6016-3-git-send-email-t.stanislaws@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomasz Stanislawski April 16, 2014, 3:12 p.m. UTC
This patch eliminates redundant checks while retrieving HPD gpio from DT during
HDMI's probe().

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 482ca77..176e764 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2012,15 +2012,12 @@  fail:
 
 static int drm_hdmi_dt_parse(struct hdmi_context *hdata, struct device_node *np)
 {
-	u32 value;
-
-	if (!of_find_property(np, "hpd-gpio", &value)) {
+	hdata->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0);
+	if (!gpio_is_valid(hdata->hpd_gpio)) {
 		DRM_ERROR("no hpd gpio property found\n");
 		return -ENOENT;
 	}
 
-	hdata->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0);
-
 	return 0;
 }