From patchwork Fri Apr 1 13:17:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 64852 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp731532lbc; Fri, 1 Apr 2016 06:18:21 -0700 (PDT) X-Received: by 10.66.141.103 with SMTP id rn7mr30557402pab.70.1459516696650; Fri, 01 Apr 2016 06:18:16 -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.16; Fri, 01 Apr 2016 06:18:16 -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 S1752597AbcDANSP (ORCPT + 4 others); Fri, 1 Apr 2016 09:18:15 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:14541 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbcDANSO (ORCPT ); Fri, 1 Apr 2016 09:18:14 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O4Y00B52IADL010@mailout1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 01 Apr 2016 14:18:13 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-b1-56fe7514d998 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 4E.01.05254.4157EF65; Fri, 1 Apr 2016 14:18:12 +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:12 +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 7/7] drm/exynos: mixer: use generic of_device_get_match_data helper Date: Fri, 01 Apr 2016 15:17:46 +0200 Message-id: <1459516666-2004-8-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/xa7oipf/CDF7f0bG4te4cq8XGGetZ La58fc9mMen+BBaLF/cusli8fmFoMeP8PiaLtUfuslvMmPySzYHT4373cSaPvi2rGD0+b5IL YI7isklJzcksSy3St0vgyujt/cFSsIGrYurOBUwNjFc5uhg5OSQETCRaV/cwQ9hiEhfurWfr YuTiEBJYyiixqHsdO4TTxCRxauthRpAqNgFDia63XWwgtoiAm0TT4ZmsIEXMAluYJNp3bWQC SQgLhEpMXzwLzGYRUJV48L4PzOYVcJf4O3k/K8Q6OYn/L1eAxTkFPCR6/h9kB7GFgGouHVjH OoGRdwEjwypG0dTS5ILipPRcQ73ixNzi0rx0veT83E2MkLD6soNx8TGrQ4wCHIxKPLw3pv0N E2JNLCuuzD3EKMHBrCTCm5L3L0yINyWxsiq1KD++qDQntfgQozQHi5I479xd70OEBNITS1Kz U1MLUotgskwcnFINjDnTzqyuWBjrNkPWxJmpJeRVR17Bj4UHrEW9PGZM00lsf5C74qyOXDzL C3PzLd5L7HWmTLTPDOUxFn215mOR323b04fdA0N43/84yvriblN62cfnDNtN2/cFTz0ospXj EWNgt4DQ3FNpRUHMAXEmi6yuK3lrpV5gu3sgYxnDdLYlNQLvzk12UGIpzkg01GIuKk4EAAhH +/knAgAA 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_mixer.c | 10 +++------- 1 file changed, 3 insertions(+), 7 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_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index ffafb744154e..caec5e4fb349 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -1231,7 +1232,7 @@ static const struct component_ops mixer_component_ops = { static int mixer_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct mixer_drv_data *drv; + const struct mixer_drv_data *drv; struct mixer_context *ctx; int ret; @@ -1241,12 +1242,7 @@ static int mixer_probe(struct platform_device *pdev) return -ENOMEM; } - if (dev->of_node) { - const struct of_device_id *match; - - match = of_match_node(mixer_match_types, dev->of_node); - drv = (struct mixer_drv_data *)match->data; - } + drv = of_device_get_match_data(dev); ctx->pdev = pdev; ctx->dev = dev;