[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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux