From patchwork Wed Apr 16 15:12:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 4002241 Return-Path: X-Original-To: patchwork-dri-devel@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 E24C99F375 for ; Wed, 16 Apr 2014 15:13:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12AAB202EB for ; Wed, 16 Apr 2014 15:13:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 340FF2015D for ; Wed, 16 Apr 2014 15:13:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6CA6F6EA97; Wed, 16 Apr 2014 08:13:15 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D39E6E3D5 for ; Wed, 16 Apr 2014 08:13:14 -0700 (PDT) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4400HHUQA1FR90@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 17 Apr 2014 00:13:13 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-ba-534e9e09e6c1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id A7.10.28157.90E9E435; Thu, 17 Apr 2014 00:13:13 +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 <0N44001CNQ9OVS50@mmp2.samsung.com>; Thu, 17 Apr 2014 00:13:13 +0900 (KST) From: Tomasz Stanislawski To: linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCHv3 1/5] drm: exynos: hdmi: remove usage of struct s5p_hdmi_platform_data Date: Wed, 16 Apr 2014 17:12:54 +0200 Message-id: <1397661178-6016-2-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1397661178-6016-1-git-send-email-t.stanislaws@samsung.com> References: <1397661178-6016-1-git-send-email-t.stanislaws@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBLMWRmVeSWpSXmKPExsVy+t9jQV3OeX7BBv93CFpsnLGe1eLK1/ds FpPuT2CxeHHvIovF2aY37BYP5t5ksphxfh+TxcV18hYTpq9lsZiy6DCrReveI+wWMya/ZLNY P+M1i8W89pesDnwea+atYfTYtKqTzeN+93Emj/6/Bh59W1YxenzeJBfAFsVlk5Kak1mWWqRv l8CV0favn6XgrUhF77mzjA2MswW7GDk5JARMJNZs72GCsMUkLtxbz9bFyMUhJDCdUeLd1K0s EE4Xk8SVV59ZQarYgDqOLfnM2MXIwSEi4CYx6z8rSA2zwC4miWXL97CA1AgLREoc62liAalh EVCVaJiWBWLyCrhL3L0sDbFLUaL72QQ2EJtTwENiyflWsE4hoJLe+V2MExh5FzAyrGIUTS1I LihOSs810itOzC0uzUvXS87P3cQIDs9n0jsYVzVYHGIU4GBU4uGdmeMbLMSaWFZcmXuIUYKD WUmE13KaX7AQb0piZVVqUX58UWlOavEhRmkOFiVx3oOt1oFCAumJJanZqakFqUUwWSYOTqkG RvXdnG+bm6cWn7TatDOT+0rkDrelG1fES4l08558PJHh0AZD71Uu12UYPU0evVGcfzHQ4Pne sBPn88xq/9/xV7skejJT7MDUjz2a01TDw7zycv13yfUuF9Pl9/e6PKF37zTmxbYJOxOtnfkn n/7wsf8lT9VVqV+VbkfLP55+6ynd/3miGWuFsRJLcUaioRZzUXEiANZwxPdLAgAA Cc: Tomasz Stanislawski , pawel.moll@arm.com, b.zolnierkie@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, robh+dt@kernel.org, rahul.sharma@samsung.com, m.chehab@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 continues shift of DRM EXYNOS to DT-only configuration. The usage of the old structure for HDMI's platform data is removed. Signed-off-by: Tomasz Stanislawski --- drivers/gpu/drm/exynos/exynos_hdmi.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 9a6d652..482ca77 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -43,7 +43,6 @@ #include "exynos_mixer.h" #include -#include #define get_hdmi_display(dev) platform_get_drvdata(to_platform_device(dev)) #define ctx_from_connector(c) container_of(c, struct hdmi_context, connector) @@ -2011,28 +2010,18 @@ fail: return -ENODEV; } -static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata - (struct device *dev) +static int drm_hdmi_dt_parse(struct hdmi_context *hdata, struct device_node *np) { - 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; - if (!of_find_property(np, "hpd-gpio", &value)) { DRM_ERROR("no hpd gpio property found\n"); - goto err_data; + return -ENOENT; } - pd->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0); - - return pd; + hdata->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0); -err_data: - return NULL; + return 0; } static struct of_device_id hdmi_match_types[] = { @@ -2051,7 +2040,6 @@ static int hdmi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct hdmi_context *hdata; - struct s5p_hdmi_platform_data *pdata; struct resource *res; const struct of_device_id *match; struct device_node *ddc_node, *phy_node; @@ -2061,14 +2049,14 @@ static int hdmi_probe(struct platform_device *pdev) if (!dev->of_node) return -ENODEV; - pdata = drm_hdmi_dt_parse_pdata(dev); - if (!pdata) - return -EINVAL; - hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL); if (!hdata) return -ENOMEM; + ret = drm_hdmi_dt_parse(hdata, dev->of_node); + if (ret) + return -EINVAL; + mutex_init(&hdata->hdmi_mutex); platform_set_drvdata(pdev, &hdmi_display); @@ -2079,8 +2067,6 @@ static int hdmi_probe(struct platform_device *pdev) drv_data = (struct hdmi_driver_data *)match->data; hdata->type = drv_data->type; - - hdata->hpd_gpio = pdata->hpd_gpio; hdata->dev = dev; ret = hdmi_resources_init(hdata);