OMAPDSS: DISPC: Change return type of dispc_mgr_set_clock_div()
authorArchit Taneja <archit@ti.com>
Fri, 29 Jun 2012 08:30:54 +0000 (14:00 +0530)
committerArchit Taneja <archit@ti.com>
Fri, 29 Jun 2012 08:30:54 +0000 (14:00 +0530)
dipsc_mgr_set_clock div has an int return type to report errors or success.
The function doesn't really check for errors and always returns 0. Change
the return type to void.

Checking for the correct DISPC clock divider ranges will be done when a DSS2
user does a manager apply. This support will be added later.

Signed-off-by: Archit Taneja <archit@ti.com>
drivers/video/omap2/dss/dispc.c
drivers/video/omap2/dss/dpi.c
drivers/video/omap2/dss/dsi.c
drivers/video/omap2/dss/dss.h
drivers/video/omap2/dss/sdi.c

index d1a7a0c9028949260316b9f507e7e448002b89a5..738ad779436f29438ad6e47b1802a4259fa28b79 100644 (file)
@@ -3224,15 +3224,13 @@ int dispc_calc_clock_rates(unsigned long dispc_fclk_rate,
        return 0;
 }
 
-int dispc_mgr_set_clock_div(enum omap_channel channel,
+void dispc_mgr_set_clock_div(enum omap_channel channel,
                struct dispc_clock_info *cinfo)
 {
        DSSDBG("lck = %lu (%u)\n", cinfo->lck, cinfo->lck_div);
        DSSDBG("pck = %lu (%u)\n", cinfo->pck, cinfo->pck_div);
 
        dispc_mgr_set_lcd_divisor(channel, cinfo->lck_div, cinfo->pck_div);
-
-       return 0;
 }
 
 int dispc_mgr_get_clock_div(enum omap_channel channel,
index a81b6d6deb57154c859f366f7dc9b958e3e7a412..bb0aad8e960aaf84d9274a67921a2e20dc56e943 100644 (file)
@@ -83,11 +83,7 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev,
 
        dss_select_dispc_clk_source(dssdev->clocks.dispc.dispc_fclk_src);
 
-       r = dispc_mgr_set_clock_div(dssdev->manager->id, &dispc_cinfo);
-       if (r) {
-               dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK);
-               return r;
-       }
+       dispc_mgr_set_clock_div(dssdev->manager->id, &dispc_cinfo);
 
        *fck = dsi_cinfo.dsi_pll_hsdiv_dispc_clk;
        *lck_div = dispc_cinfo.lck_div;
@@ -112,9 +108,7 @@ static int dpi_set_dispc_clk(struct omap_dss_device *dssdev,
        if (r)
                return r;
 
-       r = dispc_mgr_set_clock_div(dssdev->manager->id, &dispc_cinfo);
-       if (r)
-               return r;
+       dispc_mgr_set_clock_div(dssdev->manager->id, &dispc_cinfo);
 
        *fck = dss_cinfo.fck;
        *lck_div = dispc_cinfo.lck_div;
index e0d43b275e3ee632c6c3dcd829b03b6efbc07513..5db5147a6ff75deca45e04d414b99edaf2146f8d 100644 (file)
@@ -4451,11 +4451,7 @@ static int dsi_configure_dispc_clocks(struct omap_dss_device *dssdev)
                return r;
        }
 
-       r = dispc_mgr_set_clock_div(dssdev->manager->id, &dispc_cinfo);
-       if (r) {
-               DSSERR("Failed to set dispc clocks\n");
-               return r;
-       }
+       dispc_mgr_set_clock_div(dssdev->manager->id, &dispc_cinfo);
 
        return 0;
 }
index 6c5ecf02759e3cea5014908b52f45c5a25daf97e..a638846559cedb920455ce425e26f285d5b149d2 100644 (file)
@@ -425,7 +425,7 @@ void dispc_mgr_set_timings(enum omap_channel channel,
 unsigned long dispc_mgr_lclk_rate(enum omap_channel channel);
 unsigned long dispc_mgr_pclk_rate(enum omap_channel channel);
 unsigned long dispc_core_clk_rate(void);
-int dispc_mgr_set_clock_div(enum omap_channel channel,
+void dispc_mgr_set_clock_div(enum omap_channel channel,
                struct dispc_clock_info *cinfo);
 int dispc_mgr_get_clock_div(enum omap_channel channel,
                struct dispc_clock_info *cinfo);
index 0fcd4d7e202edce64263f2befabb07b74536d7e7..73f8357955ae4b66970d39b5bb383013d60ade43 100644 (file)
@@ -106,9 +106,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
        if (r)
                goto err_set_dss_clock_div;
 
-       r = dispc_mgr_set_clock_div(dssdev->manager->id, &dispc_cinfo);
-       if (r)
-               goto err_set_dispc_clock_div;
+       dispc_mgr_set_clock_div(dssdev->manager->id, &dispc_cinfo);
 
        dss_sdi_init(dssdev->phy.sdi.datapairs);
        r = dss_sdi_enable();
@@ -125,7 +123,6 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
 err_mgr_enable:
        dss_sdi_disable();
 err_sdi_enable:
-err_set_dispc_clock_div:
 err_set_dss_clock_div:
 err_calc_clock_div:
        dispc_runtime_put();