From patchwork Wed Nov 9 14:24:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 81502 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp223235qge; Wed, 9 Nov 2016 06:24:44 -0800 (PST) X-Received: by 10.107.131.16 with SMTP id f16mr486526iod.91.1478701484646; Wed, 09 Nov 2016 06:24:44 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gl6si35334487pac.291.2016.11.09.06.24.44; Wed, 09 Nov 2016 06:24:44 -0800 (PST) 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 S1754140AbcKIOYl (ORCPT + 4 others); Wed, 9 Nov 2016 09:24:41 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:60632 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754107AbcKIOYU (ORCPT ); Wed, 9 Nov 2016 09:24:20 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGD00171PCDIX50@mailout3.w1.samsung.com>; Wed, 09 Nov 2016 14:24:13 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161109142413eucas1p18ef8f21d15a64c6d690b5c1303402e6c~FZyMY7E561503015030eucas1p11; Wed, 9 Nov 2016 14:24:13 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1.samsung.com (EUCPMTA) with SMTP id 94.F7.23383.D8133285; Wed, 9 Nov 2016 14:24:13 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161109142412eucas1p17e8eeb9c289771e8a093d35d1fde28f7~FZyLyS6C_1383513835eucas1p10; Wed, 9 Nov 2016 14:24:12 +0000 (GMT) X-AuditID: cbfec7ef-f79e76d000005b57-0c-5823318de7ba Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E6.CD.10494.F6133285; Wed, 9 Nov 2016 14:23:43 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGD009LGPC36HB0@eusync2.samsung.com>; Wed, 09 Nov 2016 14:24:12 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Ulf Hansson , Bartlomiej Zolnierkiewicz , Javier Martinez Canillas Subject: [PATCH 12/12] exynos-gsc: Use of_device_get_match_data() helper Date: Wed, 09 Nov 2016 15:24:01 +0100 Message-id: <1478701441-29107-13-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1478701441-29107-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNIsWRmVeSWpSXmKPExsWy7djP87q9hsoRBjsvm1hsnLGe1eLN2zVM FufPb2C36NmwldVixvl9TBZrj9xltzj8pp3V4vjacAcOj02rOtk87lzbw+axpf8uu0ffllWM Hp83yQWwRnHZpKTmZJalFunbJXBl9Oy+wFZwj7tix4de1gbG/5xdjJwcEgImEn27ljFC2GIS F+6tZ+ti5OIQEljGKLGm4z2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Dr1uWzGCcw8i5g ZFjFKJJaWpybnltspFecmFtcmpeul5yfu4kRGNTbjv3csoOx613wIUYBDkYlHt4OTeUIIdbE suLK3EOMEhzMSiK8Mw2AQrwpiZVVqUX58UWlOanFhxhNgY6ayCwlmpwPjLi8knhDE0NzS0Mj YwsLcyMjJXHeqR+uhAsJpCeWpGanphakFsH0MXFwSjUwKh/as4N9Te5Snbj81exu844Vpze6 PHo/vct1ysoNFlyCN3J3bUu89e7CzLU3lLh9Ot038//gVOO9J5S6WtPgjAPPspeTfXKfzdw4 VX3GgsyH3S/01058GXb52Zb/fkwCUdGpngqJeiyJ1cutxIr2r1qx8ITvjpPqc/f1evkyLMt5 89X31ZHmViWW4oxEQy3mouJEAAiA416AAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161109142412eucas1p17e8eeb9c289771e8a093d35d1fde28f7 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161109142412eucas1p17e8eeb9c289771e8a093d35d1fde28f7 X-RootMTR: 20161109142412eucas1p17e8eeb9c289771e8a093d35d1fde28f7 References: <1478701441-29107-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace open-coded driver data extraction code with generic helper. Signed-off-by: Marek Szyprowski --- drivers/media/platform/exynos-gsc/gsc-core.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) -- 1.9.1 -- 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/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index ac4c96c..664398c 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "gsc-core.h" @@ -975,24 +976,12 @@ static irqreturn_t gsc_irq_handler(int irq, void *priv) }; MODULE_DEVICE_TABLE(of, exynos_gsc_match); -static void *gsc_get_drv_data(struct platform_device *pdev) -{ - struct gsc_driverdata *driver_data = NULL; - const struct of_device_id *match; - - match = of_match_node(exynos_gsc_match, pdev->dev.of_node); - if (match) - driver_data = (struct gsc_driverdata *)match->data; - - return driver_data; -} - static int gsc_probe(struct platform_device *pdev) { struct gsc_dev *gsc; struct resource *res; - struct gsc_driverdata *drv_data = gsc_get_drv_data(pdev); struct device *dev = &pdev->dev; + const struct gsc_driverdata *drv_data = of_device_get_match_data(dev); int ret; gsc = devm_kzalloc(dev, sizeof(struct gsc_dev), GFP_KERNEL);