On 8/23/2010 5:57 PM, Guruswamy, Senthilvadivu wrote:
From: Senthilvadivu Guruswamy<[email protected]>
RFBI init and exit moved to rfbi probe and remove.
Signed-off-by: Senthilvadivu Guruswamy<[email protected]>
---
drivers/video/omap2/dss/core.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 90a8f77..5030a84 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -199,12 +199,6 @@ static int omap_dss_probe(struct platform_device *pdev)
dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M);
- r = rfbi_init();
- if (r) {
- DSSERR("Failed to initialize rfbi\n");
- goto err_rfbi;
- }
-
r = dpi_init(pdev);
if (r) {
DSSERR("Failed to initialize dpi\n");
@@ -278,8 +272,6 @@ err_venc:
err_dispc:
dpi_exit();
err_dpi:
- rfbi_exit();
-err_rfbi:
dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M);
return r;
@@ -296,7 +288,6 @@ static int omap_dss_remove(struct platform_device *pdev)
venc_exit();
dispc_exit();
dpi_exit();
- rfbi_exit();
if (cpu_is_omap34xx()) {
dsi_exit();
sdi_exit();
@@ -357,11 +348,21 @@ static int omap_dsi1hw_remove(struct platform_device
*pdev)
/* RFBI HW IP initialisation */
static int omap_rfbihw_probe(struct platform_device *pdev)
{
- return 0;
+ int r;
+ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M);
+ r = rfbi_init();
+ if (r) {
+ DSSERR("Failed to initialize rfbi\n");
+ goto err_rfbi;
+ }
+err_rfbi:
+ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M);
+ return r;
There is probably something wrong in this sequence? The same thing is
done whatever the return state (except the error log).
You should probably return 0 and not disable the clocks if the rfbi_init
is successful.
Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html