[media] media:davinci: clk - {prepare/unprepare} for common clk
As a first step towards migrating davinci platforms to use common clock framework, replace all instances of clk_enable() with clk_prepare_enable() and clk_disable() with clk_disable_unprepare(). Also fixes some issues related to clk clean up in the driver Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
d046628d2c
commit
1f5a5e62ae
@@ -1053,7 +1053,7 @@ static int __devinit isif_probe(struct platform_device *pdev)
|
||||
status = PTR_ERR(isif_cfg.mclk);
|
||||
goto fail_mclk;
|
||||
}
|
||||
if (clk_enable(isif_cfg.mclk)) {
|
||||
if (clk_prepare_enable(isif_cfg.mclk)) {
|
||||
status = -ENODEV;
|
||||
goto fail_mclk;
|
||||
}
|
||||
@@ -1125,6 +1125,7 @@ fail_nobase_res:
|
||||
i--;
|
||||
}
|
||||
fail_mclk:
|
||||
clk_disable_unprepare(isif_cfg.mclk);
|
||||
clk_put(isif_cfg.mclk);
|
||||
vpfe_unregister_ccdc_device(&isif_hw_dev);
|
||||
return status;
|
||||
@@ -1145,6 +1146,8 @@ static int isif_remove(struct platform_device *pdev)
|
||||
i++;
|
||||
}
|
||||
vpfe_unregister_ccdc_device(&isif_hw_dev);
|
||||
clk_disable_unprepare(isif_cfg.mclk);
|
||||
clk_put(isif_cfg.mclk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user