From patchwork Fri Apr 1 13:17:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 64853 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp731565lbc; Fri, 1 Apr 2016 06:18:24 -0700 (PDT) X-Received: by 10.98.65.14 with SMTP id o14mr30460362pfa.151.1459516697851; Fri, 01 Apr 2016 06:18:17 -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.17; Fri, 01 Apr 2016 06:18:17 -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 S1753043AbcDANSQ (ORCPT + 4 others); Fri, 1 Apr 2016 09:18:16 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:18376 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752362AbcDANSO (ORCPT ); Fri, 1 Apr 2016 09:18:14 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O4Y00M6FIABL410@mailout2.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 01 Apr 2016 14:18:11 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-b9-56fe751334fd Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 4D.B9.04866.3157EF65; Fri, 1 Apr 2016 14:18:11 +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:11 +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 4/7] drm/exynos: rotator: use generic of_device_get_match_data helper Date: Fri, 01 Apr 2016 15:17:43 +0200 Message-id: <1459516666-2004-5-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+NgFprCLMWRmVeSWpSXmKPExsVy+t/xa7rCpf/CDM43ilrcWneO1WLjjPWs Fle+vmezmHR/AovFi3sXWSxevzC0mHF+H5PF2iN32S1mTH7J5sDpcb/7OJNH35ZVjB6fN8kF MEdx2aSk5mSWpRbp2yVwZfz9tY614Al3xbwfy1kbGP9wdjFyckgImEicOt7CAmGLSVy4t56t i5GLQ0hgKaNE08/5zBBOE5NEw49VTCBVbAKGEl1vu9hAbBEBN4mmwzNZQYqYBbYwSbTv2ghW JCwQLtG47wkziM0ioCpxY2MHWJxXwF1iydXNzBDr5CT+v1wBFucU8JDo+X+QHcQWAqq5dGAd 6wRG3gWMDKsYRVNLkwuKk9JzjfSKE3OLS/PS9ZLzczcxQsLq6w7GpcesDjEKcDAq8fDemPY3 TIg1say4MvcQowQHs5IIb0revzAh3pTEyqrUovz4otKc1OJDjNIcLErivDN3vQ8REkhPLEnN Tk0tSC2CyTJxcEo1MKp42ZzX7Hf6deBOq+MFydCbF5lPMjI6cUw3PDb/p2T4rNsvv/bVrZpx xFeYm6XqaOOkn7nZmxgWqy56LJwgsM55f1jj8nnCaduNrUPyW59fusjOvfJm9IWVpiv+rAv8 W/S57upBvfdRoacm1m3SDHXZ9KcwXThs2ammv4Gn3x8uvsqdvyVJaboSS3FGoqEWc1FxIgBO uwB/JwIAAA== 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_rotator.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 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_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index f18fbe43f55f..404367a430b5 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -696,7 +697,6 @@ static int rotator_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct rot_context *rot; struct exynos_drm_ippdrv *ippdrv; - const struct of_device_id *match; int ret; if (!dev->of_node) { @@ -708,13 +708,8 @@ static int rotator_probe(struct platform_device *pdev) if (!rot) return -ENOMEM; - match = of_match_node(exynos_rotator_match, dev->of_node); - if (!match) { - dev_err(dev, "failed to match node\n"); - return -ENODEV; - } - rot->limit_tbl = (struct rot_limit_table *)match->data; - + rot->limit_tbl = (struct rot_limit_table *) + of_device_get_match_data(dev); rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); rot->regs = devm_ioremap_resource(dev, rot->regs_res); if (IS_ERR(rot->regs))