From: Senthilvadivu Guruswamy <svad...@ti.com>

Move dss_init and dss_exit from core driver to dss driver

Signed-off-by: Senthilvadivu Guruswamy <svad...@ti.com>
---
 drivers/video/omap2/dss/core.c |   15 ---------------
 drivers/video/omap2/dss/dss.c  |   17 ++++++++++++++++-
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 24b93d5..90a8f77 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -199,18 +199,6 @@ static int omap_dss_probe(struct platform_device *pdev)
 
        dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M);
 
-#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT
-       /* DISPC_CONTROL */
-       if (omap_readl(0x48050440) & 1) /* LCD enabled? */
-               skip_init = 1;
-#endif
-
-       r = dss_init(skip_init);
-       if (r) {
-               DSSERR("Failed to initialize DSS\n");
-               goto err_dss;
-       }
-
        r = rfbi_init();
        if (r) {
                DSSERR("Failed to initialize rfbi\n");
@@ -292,8 +280,6 @@ err_dispc:
 err_dpi:
        rfbi_exit();
 err_rfbi:
-       dss_exit();
-err_dss:
        dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M);
 
        return r;
@@ -316,7 +302,6 @@ static int omap_dss_remove(struct platform_device *pdev)
                sdi_exit();
        }
 
-       dss_exit();
 
        dss_uninit_overlays(pdev);
        dss_uninit_overlay_managers(pdev);
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 098ff96..cbad9ff 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -456,6 +456,7 @@ void dss_debug_dump_clocks(struct seq_file *s)
 static int omap_dsshw_probe(struct platform_device *pdev)
 {
        int r;
+       int skip_init = 0;
 
        dss.pdev = pdev;
        dss.pdata = dss.pdev->dev.platform_data;
@@ -469,8 +470,20 @@ static int omap_dsshw_probe(struct platform_device *pdev)
        dss.ctx_id = dss_get_ctx_id();
        DSSDBG("initial ctx id %u\n", dss.ctx_id);
 
-err_clocks:
+#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT
+       /* DISPC_CONTROL */
+       if (omap_readl(0x48050440) & 1) /* LCD enabled? */
+               skip_init = 1;
+#endif
+
+       r = dss_init(skip_init);
+       if (r) {
+               DSSERR("Failed to initialize DSS\n");
+               goto err_dss;
+       }
 
+err_clocks:
+err_dss:
        return r;
 }
 
@@ -478,6 +491,8 @@ static int omap_dsshw_remove(struct platform_device *pdev)
 {
        int c;
 
+       dss_exit();
+
        /* these should be removed at some point */
        c = dss.dss_ick->usecount;
        if (c > 0) {
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to