drm/exynos: mixer: remove non-devicetree based initialization code
Subsystems (3)
PATCH 1/1 drm/exynos: mixer: remove non-devicetree based initialization 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 <[email protected]>
--- drivers/gpu/drm/exynos/exynos_mixer.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-)
drivers/gpu/drm/exynos/exynos_mixer.c +6 -22
@@ -1268,18 +1268,6 @@ static struct mixer_drv_data exynos4210_mxr_drv_data = { .has_sclk = 1, }; -static const struct platform_device_id mixer_driver_types[] = { - { - .name ="s5p-mixer" , - .driver_data = (unsigned long )&exynos4210_mxr_drv_data, - }, { - .name ="exynos5-mixer" , - .driver_data = (unsigned long )&exynos5250_mxr_drv_data, - }, { -/* end node */ - } -}; -static struct of_device_id mixer_match_types[] = { { .compatible ="samsung,exynos4210-mixer" ,
@@ -1358,23 +1346,20 @@ static int mixer_probe(struct platform_device *pdev)struct device *dev = &pdev->dev;struct mixer_drv_data *drv;struct mixer_context *ctx; +const struct of_device_id *match;int ret; +if (!dev->of_node) +return -ENODEV ; + ctx =devm_kzalloc (&pdev->dev,sizeof (*ctx),GFP_KERNEL );if (!ctx) {DRM_ERROR ("failed to alloc mixer context.\n" );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; - }else { - drv = (struct mixer_drv_data *) -platform_get_device_id (pdev)->driver_data; - } + match =of_match_node (mixer_match_types, dev->of_node); + drv = (struct mixer_drv_data *)match->data; ctx->pdev = pdev; ctx->dev = dev;
@@ -1479,5 +1464,4 @@ struct platform_driver mixer_driver = { }, .probe = mixer_probe, .remove = mixer_remove, - .id_table = mixer_driver_types, };
Signature · 1 line
1.9.2