From patchwork Fri Apr 1 13:17:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 64855 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp731624lbc; Fri, 1 Apr 2016 06:18:30 -0700 (PDT) X-Received: by 10.66.176.139 with SMTP id ci11mr30633506pac.68.1459516698844; Fri, 01 Apr 2016 06:18:18 -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.18; Fri, 01 Apr 2016 06:18:18 -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 S1752734AbcDANSR (ORCPT + 4 others); Fri, 1 Apr 2016 09:18:17 -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 S1752803AbcDANSO (ORCPT ); Fri, 1 Apr 2016 09:18:14 -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 <0O4Y00928IAAQG10@mailout3.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 01 Apr 2016 14:18:10 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-b8-56fe75129ab3 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id AC.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 3/7] drm/exynos: fimd: use generic of_device_get_match_data helper Date: Fri, 01 Apr 2016 15:17:42 +0200 Message-id: <1459516666-2004-4-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/CDN5eN7e4te4cq8XGGetZ La58fc9mMen+BBaLF/cusli8fmFoMeP8PiaLtUfuslvMmPySzYHT4373cSaPvi2rGD0+b5IL YI7isklJzcksSy3St0vgyrixYjp7QStXxaU5q9kaGE9zdDFycEgImEh8/6ffxcgJZIpJXLi3 nq2LkYtDSGApo8TRA+sYIZwmJok9e/pZQarYBAwlut52sYHYIgJuEk2HZ7KCFDELbGGSaN+1 kQkkISwQIvFpxTtGEJtFQFVi//2TYDavgLvExNtvWCDWyUn8f7kCrJ5TwEOi5/9BdhBbCKjm 0oF1rBMYeRcwMqxiFE0tTS4oTkrPNdIrTswtLs1L10vOz93ECAmqrzsYlx6zOsQowMGoxMN7 Y9rfMCHWxLLiytxDjBIczEoivCl5/8KEeFMSK6tSi/Lji0pzUosPMUpzsCiJ887c9T5ESCA9 sSQ1OzW1ILUIJsvEwSnVwLjjWAq/XcSFXdzr9jSGcecxNe7dZ7/17IZ3WZXCjEWG05qWaN9p nem87MS59zP2ib2f2lC9c36g0tLQYOnek4w36+LLDnc8qf0Y4XZ/QnHC7USegwsZRW4e2NWz 2XKu85nWvvAz5Y++HFv1xjqeozd365mnF/30wv/8+x1Zvrnw7jOlh8eNyhyVWIozEg21mIuK EwFYiNhpJgIAAA== 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_fimd.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_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 018449f8d557..4f31a8aa17dd 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -219,15 +219,6 @@ static const uint32_t fimd_formats[] = { DRM_FORMAT_ARGB8888, }; -static inline struct fimd_driver_data *drm_fimd_get_driver_data( - struct platform_device *pdev) -{ - const struct of_device_id *of_id = - of_match_device(fimd_driver_dt_match, &pdev->dev); - - return (struct fimd_driver_data *)of_id->data; -} - static int fimd_enable_vblank(struct exynos_drm_crtc *crtc) { struct fimd_context *ctx = crtc->ctx; @@ -1035,7 +1026,7 @@ static int fimd_probe(struct platform_device *pdev) ctx->dev = dev; ctx->suspended = true; - ctx->driver_data = drm_fimd_get_driver_data(pdev); + ctx->driver_data = of_device_get_match_data(dev); if (of_property_read_bool(dev->of_node, "samsung,invert-vden")) ctx->vidcon1 |= VIDCON1_INV_VDEN;