From patchwork Mon Apr 14 15:00:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 3982361 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 787EE9F2BA for ; Mon, 14 Apr 2014 15:01:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9824201D3 for ; Mon, 14 Apr 2014 15:01:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00525201CE for ; Mon, 14 Apr 2014 15:00:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753732AbaDNPAw (ORCPT ); Mon, 14 Apr 2014 11:00:52 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:45431 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753177AbaDNPAp (ORCPT ); Mon, 14 Apr 2014 11:00:45 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4100C280D85800@mailout3.samsung.com>; Tue, 15 Apr 2014 00:00:44 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-74-534bf81cc5f9 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id A0.ED.29263.C18FB435; Tue, 15 Apr 2014 00:00:44 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4100LEU0COAT20@mmp2.samsung.com>; Tue, 15 Apr 2014 00:00:44 +0900 (KST) From: Tomasz Stanislawski To: linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org Cc: m.chehab@samsung.com, robh+dt@kernel.org, inki.dae@samsung.com, kyungmin.park@samsung.com, sw0312.kim@samsung.com, t.figa@samsung.com, b.zolnierkie@samsung.com, jy0922.shim@samsung.com, rahul.sharma@samsung.com, pawel.moll@arm.com, Tomasz Stanislawski Subject: [PATCH 1/4] drm: exynos: hdmi: simplify extracting hpd-gpio from DT Date: Mon, 14 Apr 2014 17:00:19 +0200 Message-id: <1397487622-3577-2-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1397487622-3577-1-git-send-email-t.stanislaws@samsung.com> References: <1397487622-3577-1-git-send-email-t.stanislaws@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOLMWRmVeSWpSXmKPExsVy+t9jQV2ZH97BBvfaJSw2zljPanHl63s2 i0n3J7BYvLh3kcXibNMbdoueDVtZLWac38dkcXGdvMWE6WtZLKYsOsxq0br3CLvFjMkv2SzW z3jNYjGv/SWrA5/HmnlrGD02repk87jffZzJo2/LKkaPz5vkAlijuGxSUnMyy1KL9O0SuDIO dr9mLFjDWfHj6HuWBsZ77F2MnBwSAiYSC3cvYoOwxSQu3FsPZHNxCAlMZ5Q4vbKfCcLpYpKY tekOWAcbUMexJZ8ZQWwRgVSJ+as7mEGKmAUWMElM3doDViQs4COxYP92MJtFQFVi68J9LCA2 r4C7xO8bs6DWKUp0P5sAZnMKeEj0rZ3JBGILAdUc/b2VeQIj7wJGhlWMoqkFyQXFSem5hnrF ibnFpXnpesn5uZsYwcH5TGoH48oGi0OMAhyMSjy8E955BwuxJpYVV+YeYpTgYFYS4XXdChTi TUmsrEotyo8vKs1JLT7EKM3BoiTOe6DVOlBIID2xJDU7NbUgtQgmy8TBKdXAOPP/88Lpd9ZK 7zxvMMFDKNuG1+zHxYeX7Q6cF3h77/vjoo1PVgfO+Sah9VnblEH08imduoCjxhM4XOp1zUzc L24QnxLdcjOEl4O9eeGB/V7Z++7sjd6gl1jJsUngwI6fwbsz59wLq9/hUBzb13sj13jGmRVO 36y+uLRvKuycKJ2U2tWv8tj9qxJLcUaioRZzUXEiAP9mfVJKAgAA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch eliminates redundant checks while retrieving HPD gpio from DT during HDMI's probe(). Signed-off-by: Tomasz Stanislawski --- drivers/gpu/drm/exynos/exynos_hdmi.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 9a6d652..d2d6e2e 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2016,23 +2016,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; - 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(np, "hpd-gpio", 0); + if (gpio_is_valid(pd->hpd_gpio)) { DRM_ERROR("no hpd gpio property found\n"); - goto err_data; + return NULL; } - pd->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0); - return pd; - -err_data: - return NULL; } static struct of_device_id hdmi_match_types[] = {