Message ID | 1397661178-6016-3-git-send-email-t.stanislaws@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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; }
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(-)