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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch eliminates redundant checks while retrieving HPD gpio from DT during
HDMI's probe().

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

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;
 }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux