<br><br>2012³â 10¿ù 12ÀÏ ±Ý¿äÀÏ¿¡ Rahul Sharma´ÔÀÌ ÀÛ¼º:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch moved the exynos-drm-hdmi platform device registration to the drm<br>

driver. When DT is enabled, platform devices needs to be registered within the<br>
driver code. This patch fits the requirement of both DT and Non DT based drm<br>
drivers.<br>
<br>
Signed-off-by: Rahul Sharma <<a href="javascript:;" onclick="_e(event, 'cvml', 'rahul.sharma@samsung.com')">rahul.sharma@samsung.com</a>><br>
---<br>
 drivers/gpu/drm/exynos/exynos_drm_drv.c |   15 ++++++++++++++-<br>
 1 files changed, 14 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c<br>
index 4200f15..643c47f 100644<br>
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c<br>
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c<br>
@@ -53,6 +53,9 @@<br>
 /* platform device pointer for eynos drm device. */<br>
 static struct platform_device *exynos_drm_pdev;<br>
<br>
+/* platform device pointer for common drm hdmi device. */<br>
+static struct platform_device *exynos_drm_hdmi_pdev;</blockquote><div><br></div><div>Is exynos_drm_hdmi_pdev related to exynos_drm_drv? I don't really like such thing. let's comply with layer rule. so how about moving exynos_drm_hdmi_pdev into exynos_drm_hdmi layer and just calling platform_device_hdmi_register instead of platform_device_register_simple? for this, exynos_drm_hdmi_pdev should be defined and declared in exynos_drm_hdmi layer. it means that we have one wrapper to common hdmi layer.</div>
<div><br></div><span></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
 static int exynos_drm_load(struct drm_device *dev, unsigned long flags)<br>
 {<br>
        struct exynos_drm_private *private;<br>
@@ -329,6 +332,13 @@ static int __init exynos_drm_init(void)<br>
        ret = platform_driver_register(&exynos_drm_common_hdmi_driver);<br>
        if (ret < 0)<br>
                goto out_common_hdmi;<br>
+<br>
+       exynos_drm_hdmi_pdev = platform_device_register_simple(<br>
+                       "exynos-drm-hdmi", -1, NULL, 0);<br>
+       if (IS_ERR_OR_NULL(exynos_drm_hdmi_pdev)) {<br>
+               ret = PTR_ERR(exynos_drm_hdmi_pdev);<br>
+               goto out_common_hdmi_dev;<br>
+       }<br>
 #endif<br>
<br>
 #ifdef CONFIG_DRM_EXYNOS_VIDI<br>
@@ -366,11 +376,13 @@ out_g2d:<br>
 #endif<br>
<br>
 #ifdef CONFIG_DRM_EXYNOS_VIDI<br>
-out_vidi:<br>
        platform_driver_unregister(&vidi_driver);<br>
+out_vidi:<br>
 #endif<br>
<br>
 #ifdef CONFIG_DRM_EXYNOS_HDMI<br>
+       platform_device_unregister(exynos_drm_hdmi_pdev);<br>
+out_common_hdmi_dev:<br>
        platform_driver_unregister(&exynos_drm_common_hdmi_driver);<br>
 out_common_hdmi:<br>
        platform_driver_unregister(&mixer_driver);<br>
@@ -399,6 +411,7 @@ static void __exit exynos_drm_exit(void)<br>
 #endif<br>
<br>
 #ifdef CONFIG_DRM_EXYNOS_HDMI<br>
+       platform_device_unregister(exynos_drm_hdmi_pdev);</blockquote><div><br></div><div>ditto. let's call platform_device_hdmi_unregister instead.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

        platform_driver_unregister(&exynos_drm_common_hdmi_driver);<br>
        platform_driver_unregister(&mixer_driver);<br>
        platform_driver_unregister(&hdmi_driver);<br>
--<br>
1.7.0.4<br>
<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'dri-devel@lists.freedesktop.org')">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</blockquote>