From patchwork Fri Apr 1 13:17:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 64851 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp731513lbc; Fri, 1 Apr 2016 06:18:18 -0700 (PDT) X-Received: by 10.98.18.212 with SMTP id 81mr31070674pfs.104.1459516695984; Fri, 01 Apr 2016 06:18:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ny6si21355037pab.59.2016.04.01.06.18.15; Fri, 01 Apr 2016 06:18:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549AbcDANSO (ORCPT + 4 others); Fri, 1 Apr 2016 09:18:14 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:38613 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752597AbcDANSN (ORCPT ); Fri, 1 Apr 2016 09:18:13 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O4Y0086FIAARF10@mailout3.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 01 Apr 2016 14:18:10 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-b5-56fe75127ef4 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id BB.B9.04866.2157EF65; Fri, 1 Apr 2016 14:18:10 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O4Y00HG5IA6GI20@eusync4.samsung.com>; Fri, 01 Apr 2016 14:18:10 +0100 (BST) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Andrzej Hajda , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH 2/7] drm/exynos: dsi: use generic of_device_get_match_data helper Date: Fri, 01 Apr 2016 15:17:41 +0200 Message-id: <1459516666-2004-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1459516666-2004-1-git-send-email-m.szyprowski@samsung.com> References: <1459516666-2004-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprMLMWRmVeSWpSXmKPExsVy+t/xa7pCpf/CDK7Nk7G4te4cq8XGGetZ La58fc9mMen+BBaLF/cusli8fmFoMeP8PiaLtUfuslvMmPySzYHT4373cSaPvi2rGD0+b5IL YI7isklJzcksSy3St0vgymg4v5y9oIOr4uzt9ewNjKc5uhg5OSQETCQeLnjDCmGLSVy4t56t i5GLQ0hgKaPE/v9LoJwmJok9e/rBqtgEDCW63naxgdgiAm4STYdnsoIUMQtsYZJo37WRqYuR g0NYIFji7+cykBoWAVWJU39uMoPYvALuEqd7bzBCbJOT+P9yBROIzSngIdHz/yA7iC0EVHPp wDrWCYy8CxgZVjGKppYmFxQnpeca6RUn5haX5qXrJefnbmKEBNXXHYxLj1kdYhTgYFTi4b0x 7W+YEGtiWXFl7iFGCQ5mJRHelLx/YUK8KYmVValF+fFFpTmpxYcYpTlYlMR5Z+56HyIkkJ5Y kpqdmlqQWgSTZeLglGpgPLL3WFby/gnz5FVSBeYc0JlssNT6z+7fu/ZKSs7fx7P3eoHa45BT en875K7HFp+8fe3D5v37f9TIJbJZsadNes5yqMEw8FuG61+D/X8nPUjI3rXxqtyH8obqK1NO Lpro4XbuVKfwhtNMgs/6Yy8pNv2UnHXvZteeCXct+oyvfksPyOhQUYx9baTEUpyRaKjFXFSc CACNXgRbJgIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Simplify code by replacing custom code by generic helper. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 63c84a106c0b..b6518df2411d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -532,15 +532,6 @@ static const struct of_device_id exynos_dsi_of_match[] = { { } }; -static inline struct exynos_dsi_driver_data *exynos_dsi_get_driver_data( - struct platform_device *pdev) -{ - const struct of_device_id *of_id = - of_match_device(exynos_dsi_of_match, &pdev->dev); - - return (struct exynos_dsi_driver_data *)of_id->data; -} - static void exynos_dsi_wait_for_reset(struct exynos_dsi *dsi) { if (wait_for_completion_timeout(&dsi->completed, msecs_to_jiffies(300))) @@ -1833,7 +1824,7 @@ static int exynos_dsi_probe(struct platform_device *pdev) dsi->dsi_host.dev = dev; dsi->dev = dev; - dsi->driver_data = exynos_dsi_get_driver_data(pdev); + dsi->driver_data = of_device_get_match_data(dev); ret = exynos_dsi_parse_dt(dsi); if (ret)