]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
[media] s5p-g2d: remove non-device-tree init code
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 9 Dec 2015 14:00:14 +0000 (12:00 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 13 Apr 2016 19:25:17 +0000 (16:25 -0300)
Exynos and Samsung S5P platforms 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>
drivers/media/platform/s5p-g2d/g2d.c
drivers/media/platform/s5p-g2d/g2d.h

index 74bd46ca7942bed381d32064b983b09d3bc24185..612d1ea514f19720406a2ca1d2ef866c08d358e6 100644 (file)
@@ -719,16 +719,12 @@ static int g2d_probe(struct platform_device *pdev)
 
        def_frame.stride = (def_frame.width * def_frame.fmt->depth) >> 3;
 
-       if (!pdev->dev.of_node) {
-               dev->variant = g2d_get_drv_data(pdev);
-       } else {
-               of_id = of_match_node(exynos_g2d_match, pdev->dev.of_node);
-               if (!of_id) {
-                       ret = -ENODEV;
-                       goto unreg_video_dev;
-               }
-               dev->variant = (struct g2d_variant *)of_id->data;
+       of_id = of_match_node(exynos_g2d_match, pdev->dev.of_node);
+       if (!of_id) {
+               ret = -ENODEV;
+               goto unreg_video_dev;
        }
+       dev->variant = (struct g2d_variant *)of_id->data;
 
        return 0;
 
@@ -788,22 +784,9 @@ static const struct of_device_id exynos_g2d_match[] = {
 };
 MODULE_DEVICE_TABLE(of, exynos_g2d_match);
 
-static const struct platform_device_id g2d_driver_ids[] = {
-       {
-               .name = "s5p-g2d",
-               .driver_data = (unsigned long)&g2d_drvdata_v3x,
-       }, {
-               .name = "s5p-g2d-v4x",
-               .driver_data = (unsigned long)&g2d_drvdata_v4x,
-       },
-       {},
-};
-MODULE_DEVICE_TABLE(platform, g2d_driver_ids);
-
 static struct platform_driver g2d_pdrv = {
        .probe          = g2d_probe,
        .remove         = g2d_remove,
-       .id_table       = g2d_driver_ids,
        .driver         = {
                .name = G2D_NAME,
                .of_match_table = exynos_g2d_match,
index b0e52ab7ecdb806b102a51497c2f29303fd5772e..e31df541aa62ba7e3696bf5caae009f7e0ba6273 100644 (file)
@@ -89,8 +89,3 @@ void g2d_set_flip(struct g2d_dev *d, u32 r);
 void g2d_set_v41_stretch(struct g2d_dev *d,
                        struct g2d_frame *src, struct g2d_frame *dst);
 void g2d_set_cmd(struct g2d_dev *d, u32 c);
-
-static inline struct g2d_variant *g2d_get_drv_data(struct platform_device *pdev)
-{
-       return (struct g2d_variant *)platform_get_device_id(pdev)->driver_data;
-}