diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2015-12-09 12:00:13 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-13 16:24:39 -0300 |
commit | c1ac057173ba674d93afc8ddc5c91da1c61a951a (patch) | |
tree | 80664f511a55db143741f5e560eb46c78aafd33c /drivers/media/platform/exynos-gsc | |
parent | 77401dd7394c5d7b593718361ac6bb8f1aa4db62 (diff) | |
download | op-kernel-dev-c1ac057173ba674d93afc8ddc5c91da1c61a951a.zip op-kernel-dev-c1ac057173ba674d93afc8ddc5c91da1c61a951a.tar.gz |
[media] exynos-gsc: remove non-device-tree init code
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 <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/exynos-gsc')
-rw-r--r-- | drivers/media/platform/exynos-gsc/gsc-core.c | 33 | ||||
-rw-r--r-- | drivers/media/platform/exynos-gsc/gsc-core.h | 1 |
2 files changed, 6 insertions, 28 deletions
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 9b9e423..032a423 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); @@ -1253,7 +1233,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; |