mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
[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>
This commit is contained in:
parent
77401dd739
commit
c1ac057173
2 changed files with 6 additions and 28 deletions
|
@ -967,15 +967,6 @@ static struct gsc_driverdata gsc_v_100_drvdata = {
|
||||||
.lclk_frequency = 266000000UL,
|
.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[] = {
|
static const struct of_device_id exynos_gsc_match[] = {
|
||||||
{
|
{
|
||||||
.compatible = "samsung,exynos5-gsc",
|
.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)
|
static void *gsc_get_drv_data(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct gsc_driverdata *driver_data = NULL;
|
struct gsc_driverdata *driver_data = NULL;
|
||||||
|
const struct of_device_id *match;
|
||||||
|
|
||||||
if (pdev->dev.of_node) {
|
match = of_match_node(exynos_gsc_match, pdev->dev.of_node);
|
||||||
const struct of_device_id *match;
|
if (match)
|
||||||
match = of_match_node(exynos_gsc_match,
|
driver_data = (struct gsc_driverdata *)match->data;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
return driver_data;
|
return driver_data;
|
||||||
}
|
}
|
||||||
|
@ -1084,19 +1069,14 @@ static int gsc_probe(struct platform_device *pdev)
|
||||||
if (!gsc)
|
if (!gsc)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
if (dev->of_node)
|
gsc->id = of_alias_get_id(pdev->dev.of_node, "gsc");
|
||||||
gsc->id = of_alias_get_id(pdev->dev.of_node, "gsc");
|
if (gsc->id >= drv_data->num_entities || gsc->id < 0) {
|
||||||
else
|
|
||||||
gsc->id = pdev->id;
|
|
||||||
|
|
||||||
if (gsc->id >= drv_data->num_entities) {
|
|
||||||
dev_err(dev, "Invalid platform device id: %d\n", gsc->id);
|
dev_err(dev, "Invalid platform device id: %d\n", gsc->id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
gsc->variant = drv_data->variant[gsc->id];
|
gsc->variant = drv_data->variant[gsc->id];
|
||||||
gsc->pdev = pdev;
|
gsc->pdev = pdev;
|
||||||
gsc->pdata = dev->platform_data;
|
|
||||||
|
|
||||||
init_waitqueue_head(&gsc->irq_queue);
|
init_waitqueue_head(&gsc->irq_queue);
|
||||||
spin_lock_init(&gsc->slock);
|
spin_lock_init(&gsc->slock);
|
||||||
|
@ -1253,7 +1233,6 @@ static const struct dev_pm_ops gsc_pm_ops = {
|
||||||
static struct platform_driver gsc_driver = {
|
static struct platform_driver gsc_driver = {
|
||||||
.probe = gsc_probe,
|
.probe = gsc_probe,
|
||||||
.remove = gsc_remove,
|
.remove = gsc_remove,
|
||||||
.id_table = gsc_driver_ids,
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = GSC_MODULE_NAME,
|
.name = GSC_MODULE_NAME,
|
||||||
.pm = &gsc_pm_ops,
|
.pm = &gsc_pm_ops,
|
||||||
|
|
|
@ -340,7 +340,6 @@ struct gsc_dev {
|
||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
wait_queue_head_t irq_queue;
|
wait_queue_head_t irq_queue;
|
||||||
struct gsc_m2m_device m2m;
|
struct gsc_m2m_device m2m;
|
||||||
struct exynos_platform_gscaler *pdata;
|
|
||||||
unsigned long state;
|
unsigned long state;
|
||||||
struct vb2_alloc_ctx *alloc_ctx;
|
struct vb2_alloc_ctx *alloc_ctx;
|
||||||
struct video_device vdev;
|
struct video_device vdev;
|
||||||
|
|
Loading…
Add table
Reference in a new issue