[PATCH v2 3/7] drm/exynos: register platform driver at each kms sub drivers
Inki Dae
inki.dae at samsung.com
Tue Apr 1 05:37:58 PDT 2014
This patch removes platform_driver_register() calls from
exynos_drm_drv module, and calls module_platform_driver()
at each kms sub drivers instead.
Previous RFC patch,
http://www.spinics.net/lists/dri-devel/msg54672.html
Changelog since RFC patch:
- remove unnecessary platform_driver declarations to each sub driver.
Changelog v2:
- remove unnecessary platform_driver for mipi dsi driver.
Signed-off-by: Inki Dae <inki.dae at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
---
drivers/gpu/drm/exynos/exynos_dp_core.c | 1 +
drivers/gpu/drm/exynos/exynos_drm_drv.c | 64 ------------------------------
drivers/gpu/drm/exynos/exynos_drm_drv.h | 6 ---
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 +
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 1 +
drivers/gpu/drm/exynos/exynos_hdmi.c | 1 +
drivers/gpu/drm/exynos/exynos_mixer.c | 1 +
7 files changed, 5 insertions(+), 70 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c
index cb9aa58..bf4996f 100644
--- a/drivers/gpu/drm/exynos/exynos_dp_core.c
+++ b/drivers/gpu/drm/exynos/exynos_dp_core.c
@@ -1362,6 +1362,7 @@ struct platform_driver dp_driver = {
.of_match_table = exynos_dp_match,
},
};
+module_platform_driver(dp_driver);
MODULE_AUTHOR("Jingoo Han <jg1.han at samsung.com>");
MODULE_DESCRIPTION("Samsung SoC DP Driver");
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index f065385..c2f444a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -468,33 +468,6 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
exynos_drm_driver.num_ioctls = DRM_ARRAY_SIZE(exynos_ioctls);
-#ifdef CONFIG_DRM_EXYNOS_DP
- ret = platform_driver_register(&dp_driver);
- if (ret < 0)
- goto out_dp;
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_DSI
- ret = platform_driver_register(&dsi_driver);
- if (ret < 0)
- goto out_dsi;
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_FIMD
- ret = platform_driver_register(&fimd_driver);
- if (ret < 0)
- goto out_fimd;
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_HDMI
- ret = platform_driver_register(&hdmi_driver);
- if (ret < 0)
- goto out_hdmi;
- ret = platform_driver_register(&mixer_driver);
- if (ret < 0)
- goto out_mixer;
-#endif
-
#ifdef CONFIG_DRM_EXYNOS_G2D
ret = platform_driver_register(&g2d_driver);
if (ret < 0)
@@ -562,27 +535,6 @@ out_fimc:
out_g2d:
#endif
-#ifdef CONFIG_DRM_EXYNOS_HDMI
- platform_driver_unregister(&mixer_driver);
-out_mixer:
- platform_driver_unregister(&hdmi_driver);
-out_hdmi:
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_FIMD
- platform_driver_unregister(&fimd_driver);
-out_fimd:
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_DSI
- platform_driver_unregister(&dsi_driver);
-out_dsi:
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_DP
- platform_driver_unregister(&dp_driver);
-out_dp:
-#endif
return ret;
}
@@ -609,22 +561,6 @@ static int exynos_drm_platform_remove(struct platform_device *pdev)
platform_driver_unregister(&g2d_driver);
#endif
-#ifdef CONFIG_DRM_EXYNOS_HDMI
- platform_driver_unregister(&mixer_driver);
- platform_driver_unregister(&hdmi_driver);
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_FIMD
- platform_driver_unregister(&fimd_driver);
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_DSI
- platform_driver_unregister(&dsi_driver);
-#endif
-
-#ifdef CONFIG_DRM_EXYNOS_DP
- platform_driver_unregister(&dp_driver);
-#endif
component_master_del(&pdev->dev, &exynos_drm_ops);
return 0;
}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 25d562f..2b87eb7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -356,12 +356,6 @@ int exynos_drm_probe_vidi(struct drm_device *dev);
int exynos_drm_create_enc_conn(struct drm_device *dev,
struct exynos_drm_display *display);
-extern struct platform_driver dp_driver;
-extern struct platform_driver dsi_driver;
-extern struct platform_driver fimd_driver;
-extern struct platform_driver hdmi_driver;
-extern struct platform_driver mixer_driver;
-extern struct platform_driver exynos_drm_common_hdmi_driver;
extern struct platform_driver vidi_driver;
extern struct platform_driver g2d_driver;
extern struct platform_driver fimc_driver;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 8f48f52..0005527 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1546,6 +1546,7 @@ struct platform_driver dsi_driver = {
.of_match_table = exynos_dsi_of_match,
},
};
+module_platform_driver(dsi_driver);
MODULE_AUTHOR("Tomasz Figa <t.figa at samsung.com>");
MODULE_AUTHOR("Andrzej Hajda <a.hajda at samsung.com>");
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 7ebfe15..aea4dbd 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -992,3 +992,4 @@ struct platform_driver fimd_driver = {
.of_match_table = fimd_driver_dt_match,
},
};
+module_platform_driver(fimd_driver);
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 3620d44..5db1b2d 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2193,3 +2193,4 @@ struct platform_driver hdmi_driver = {
.of_match_table = hdmi_match_types,
},
};
+module_platform_driver(hdmi_driver);
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index d46a262..12ef887 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -1292,3 +1292,4 @@ struct platform_driver mixer_driver = {
.remove = mixer_remove,
.id_table = mixer_driver_types,
};
+module_platform_driver(mixer_driver);
--
1.7.9.5
More information about the dri-devel
mailing list