From patchwork Wed Aug 28 05:17:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 19555 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4EAA5248E8 for ; Wed, 28 Aug 2013 05:35:53 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w8sf289057qac.0 for ; Tue, 27 Aug 2013 22:35:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=xpAoqg4fL4ZDjsqYnz7UCjQp+WUlwkAQOlm4zAtf17g=; b=M82cgdswqVUWBFVopjAipMwdX3Cdfbc9Qn/53qDnCNDeMmXeUAUPkO9u/7QDyba103 YS31Nl+t3R1BR0bq8X5vLGhUiFjE7hco2WjgUXNQHmyvxzajg0ofilRxzAWAPQAbORVT WKTMQVJyCR4jr+K8QwT3/Kxbpm/Vwv8EZub7bqfq1C7VQnUmcaqDekZC3EotGICG6IBA jFxIU0C2kMdOMrNUeGCoTSGsavaMN21Qjqc94RYATs0kJtoAEbTNg4XJnK79VTP7CCjb yVWK0SjOKnGlWrU2reTQKPv3/7ioTfXTCvHiRuFnAinkI75s7qXdLL2m24i5zBLwfi++ 8UBQ== X-Received: by 10.236.53.70 with SMTP id f46mr9333278yhc.17.1377668153105; Tue, 27 Aug 2013 22:35:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.166 with SMTP id z6ls228709qeb.18.gmail; Tue, 27 Aug 2013 22:35:53 -0700 (PDT) X-Received: by 10.52.34.10 with SMTP id v10mr4594052vdi.28.1377668152979; Tue, 27 Aug 2013 22:35:52 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id jf10si5995424vdb.115.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 22:35:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so3609982vbg.25 for ; Tue, 27 Aug 2013 22:35:52 -0700 (PDT) X-Gm-Message-State: ALoCoQnyDmeViWF+oUjtGLTMVn0CHkulAgULjodIlAj7LTxXF7J1aZrGWjNoRYj1DL4qMDKEnPgq X-Received: by 10.52.249.102 with SMTP id yt6mr13197087vdc.21.1377668152827; Tue, 27 Aug 2013 22:35:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp336228vcz; Tue, 27 Aug 2013 22:35:52 -0700 (PDT) X-Received: by 10.67.22.106 with SMTP id hr10mr13103095pad.155.1377668151841; Tue, 27 Aug 2013 22:35:51 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id if5si19097014pad.263.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 22:35:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id p10so5808563pdj.18 for ; Tue, 27 Aug 2013 22:35:51 -0700 (PDT) X-Received: by 10.66.25.205 with SMTP id e13mr1190836pag.180.1377668151336; Tue, 27 Aug 2013 22:35:51 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id pu5sm31244266pac.21.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 22:35:50 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Cc: inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH Resend 5/6] drm/exynos: Remove non-DT support in exynos_hdmi Date: Wed, 28 Aug 2013 10:47:57 +0530 Message-Id: <1377667078-14163-5-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1377667078-14163-1-git-send-email-sachin.kamat@linaro.org> References: <1377667078-14163-1-git-send-email-sachin.kamat@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_hdmi.c | 70 ++++++---------------------------- 1 file changed, 12 insertions(+), 58 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 8ea07a1..a0e10ae 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1858,7 +1858,6 @@ void hdmi_attach_hdmiphy_client(struct i2c_client *hdmiphy) hdmi_hdmiphy = hdmiphy; } -#ifdef CONFIG_OF static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata (struct device *dev) { @@ -1882,33 +1881,7 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata err_data: return NULL; } -#else -static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata - (struct device *dev) -{ - return NULL; -} -#endif - -static struct platform_device_id hdmi_driver_types[] = { - { - .name = "s5pv210-hdmi", - .driver_data = HDMI_TYPE13, - }, { - .name = "exynos4-hdmi", - .driver_data = HDMI_TYPE13, - }, { - .name = "exynos4-hdmi14", - .driver_data = HDMI_TYPE14, - }, { - .name = "exynos5-hdmi", - .driver_data = HDMI_TYPE14, - }, { - /* end node */ - } -}; -#ifdef CONFIG_OF static struct of_device_id hdmi_match_types[] = { { .compatible = "samsung,exynos5-hdmi", @@ -1920,7 +1893,6 @@ static struct of_device_id hdmi_match_types[] = { /* end node */ } }; -#endif static int hdmi_probe(struct platform_device *pdev) { @@ -1929,30 +1901,21 @@ static int hdmi_probe(struct platform_device *pdev) struct hdmi_context *hdata; struct s5p_hdmi_platform_data *pdata; struct resource *res; + const struct of_device_id *match; int ret; - if (dev->of_node) { - pdata = drm_hdmi_dt_parse_pdata(dev); - if (IS_ERR(pdata)) { - DRM_ERROR("failed to parse dt\n"); - return PTR_ERR(pdata); - } - } else { - pdata = dev->platform_data; - } + if (!dev->of_node) + return -ENODEV; - if (!pdata) { - DRM_ERROR("no platform data specified\n"); + pdata = drm_hdmi_dt_parse_pdata(dev); + if (!pdata) return -EINVAL; - } - drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), - GFP_KERNEL); + drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), GFP_KERNEL); if (!drm_hdmi_ctx) return -ENOMEM; - hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), - GFP_KERNEL); + hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL); if (!hdata) return -ENOMEM; @@ -1963,23 +1926,15 @@ static int hdmi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, drm_hdmi_ctx); - if (dev->of_node) { - const struct of_device_id *match; - match = of_match_node(of_match_ptr(hdmi_match_types), - dev->of_node); - if (match == NULL) - return -ENODEV; - hdata->type = (enum hdmi_type)match->data; - } else { - hdata->type = (enum hdmi_type)platform_get_device_id - (pdev)->driver_data; - } + match = of_match_node(hdmi_match_types, dev->of_node); + if (!match) + return -ENODEV; + hdata->type = (enum hdmi_type)match->data; hdata->hpd_gpio = pdata->hpd_gpio; hdata->dev = dev; ret = hdmi_resources_init(hdata); - if (ret) { DRM_ERROR("hdmi_resources_init failed\n"); return -EINVAL; @@ -2134,11 +2089,10 @@ static const struct dev_pm_ops hdmi_pm_ops = { struct platform_driver hdmi_driver = { .probe = hdmi_probe, .remove = hdmi_remove, - .id_table = hdmi_driver_types, .driver = { .name = "exynos-hdmi", .owner = THIS_MODULE, .pm = &hdmi_pm_ops, - .of_match_table = of_match_ptr(hdmi_match_types), + .of_match_table = hdmi_match_types, }, };