From patchwork Wed Dec 9 14:00:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 58146 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp686338lbb; Wed, 9 Dec 2015 06:00:32 -0800 (PST) X-Received: by 10.98.1.213 with SMTP id 204mr13194519pfb.128.1449669632408; Wed, 09 Dec 2015 06:00:32 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z69si12950952pfi.42.2015.12.09.06.00.32; Wed, 09 Dec 2015 06:00:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-media-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-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754929AbbLIOA3 (ORCPT + 4 others); Wed, 9 Dec 2015 09:00:29 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:63277 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751514AbbLIOA2 (ORCPT ); Wed, 9 Dec 2015 09:00:28 -0500 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 <0NZ300LO8G8QZL80@mailout1.w1.samsung.com>; Wed, 09 Dec 2015 14:00:26 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-28-566833fa6a02 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id D5.A6.16778.AF338665; Wed, 9 Dec 2015 14:00:26 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NZ300N2FG8M3900@eusync1.samsung.com>; Wed, 09 Dec 2015 14:00:26 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Kamil Debski Subject: [PATCH 1/4] media: exynos-gsc: remove non-device-tree init code Date: Wed, 09 Dec 2015 15:00:13 +0100 Message-id: <1449669616-24802-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t/xy7q/jDPCDKZ+ELP48foCm0XPhq2s FjPO72OyWHvkLrvF4TftrA6sHn1bVjF6fN4kF8AUxWWTkpqTWZZapG+XwJXx/PhyxoJPEhVL ft5lbmC8K9LFyMkhIWAi0ff8MDOELSZx4d56ti5GLg4hgaWMEm2bLzFBOE1MEhcvn2AHqWIT MJToetvFBmKLCDhJLJz1lx2kiFmglVHixL2nrCAJYQEPibXHPoHZLAKqEh8ObGQBsXmB4ndP 7mGCWCcn8f/lCqYJjNwLGBlWMYqmliYXFCel5xrqFSfmFpfmpesl5+duYoT4/csOxsXHrA4x CnAwKvHwXnBJDxNiTSwrrsw9xCjBwawkwntCPyNMiDclsbIqtSg/vqg0J7X4EKM0B4uSOO/c Xe9DhATSE0tSs1NTC1KLYLJMHJxSDYxsNx/5/Xq312apx1ezwh+LZbb4bWi6Y1N28O/t7sD/ ooGtzsuY/sf37SmOlnitssHz6eVCYQatGO3NO3fkTWa45XRmFXfKafsMCcWKbfV9MrW39rm/ 8ftpH2kzLc3v5enr9StLf+01+P7rb+7Hf/aZot7zW2QWrTtSEPngEXd7qPOUEw1FiWpKLMUZ iYZazEXFiQA+1hp69wEAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Exynos platform has been fully converted to device tree, so old platform device based init data can be now removed. Signed-off-by: Marek Szyprowski --- drivers/media/platform/exynos-gsc/gsc-core.c | 33 +++++----------------------- drivers/media/platform/exynos-gsc/gsc-core.h | 1 - 2 files changed, 6 insertions(+), 28 deletions(-) -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" 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 4f90be4..1b744a6 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -967,15 +967,6 @@ static struct gsc_driverdata gsc_v_100_drvdata = { .lclk_frequency = 266000000UL, }; -static const struct platform_device_id gsc_driver_ids[] = { - { - .name = "exynos-gsc", - .driver_data = (unsigned long)&gsc_v_100_drvdata, - }, - {}, -}; -MODULE_DEVICE_TABLE(platform, gsc_driver_ids); - static const struct of_device_id exynos_gsc_match[] = { { .compatible = "samsung,exynos5-gsc", @@ -988,17 +979,11 @@ 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; - if (pdev->dev.of_node) { - 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; - } else { - driver_data = (struct gsc_driverdata *) - platform_get_device_id(pdev)->driver_data; - } + match = of_match_node(exynos_gsc_match, pdev->dev.of_node); + if (match) + driver_data = (struct gsc_driverdata *)match->data; return driver_data; } @@ -1084,19 +1069,14 @@ static int gsc_probe(struct platform_device *pdev) if (!gsc) return -ENOMEM; - if (dev->of_node) - gsc->id = of_alias_get_id(pdev->dev.of_node, "gsc"); - else - gsc->id = pdev->id; - - if (gsc->id >= drv_data->num_entities) { + gsc->id = of_alias_get_id(pdev->dev.of_node, "gsc"); + if (gsc->id >= drv_data->num_entities || gsc->id < 0) { dev_err(dev, "Invalid platform device id: %d\n", gsc->id); return -EINVAL; } gsc->variant = drv_data->variant[gsc->id]; gsc->pdev = pdev; - gsc->pdata = dev->platform_data; init_waitqueue_head(&gsc->irq_queue); spin_lock_init(&gsc->slock); @@ -1254,7 +1234,6 @@ static const struct dev_pm_ops gsc_pm_ops = { static struct platform_driver gsc_driver = { .probe = gsc_probe, .remove = gsc_remove, - .id_table = gsc_driver_ids, .driver = { .name = GSC_MODULE_NAME, .pm = &gsc_pm_ops, diff --git a/drivers/media/platform/exynos-gsc/gsc-core.h b/drivers/media/platform/exynos-gsc/gsc-core.h index e93a233..ec4000c 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.h +++ b/drivers/media/platform/exynos-gsc/gsc-core.h @@ -340,7 +340,6 @@ struct gsc_dev { void __iomem *regs; wait_queue_head_t irq_queue; struct gsc_m2m_device m2m; - struct exynos_platform_gscaler *pdata; unsigned long state; struct vb2_alloc_ctx *alloc_ctx; struct video_device vdev;