[PATCH] soc: ti: smartreflex: change to use devm_clk_get_prepared() helpers
Wu Bo
bo.wu at vivo.com
Thu Aug 22 02:59:11 PDT 2024
Make the code cleaner and avoid call clk_unprepare()
Signed-off-by: Wu Bo <bo.wu at vivo.com>
---
drivers/soc/ti/smartreflex.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c
index d6219060b616..103ea0ae7661 100644
--- a/drivers/soc/ti/smartreflex.c
+++ b/drivers/soc/ti/smartreflex.c
@@ -844,10 +844,9 @@ static int omap_sr_probe(struct platform_device *pdev)
if (ret > 0)
sr_info->irq = ret;
- sr_info->fck = devm_clk_get(pdev->dev.parent, "fck");
+ sr_info->fck = devm_clk_get_prepared(pdev->dev.parent, "fck");
if (IS_ERR(sr_info->fck))
return PTR_ERR(sr_info->fck);
- clk_prepare(sr_info->fck);
pm_runtime_enable(&pdev->dev);
@@ -928,7 +927,6 @@ static int omap_sr_probe(struct platform_device *pdev)
err_list_del:
pm_runtime_disable(&pdev->dev);
list_del(&sr_info->node);
- clk_unprepare(sr_info->fck);
return ret;
}
@@ -943,7 +941,6 @@ static void omap_sr_remove(struct platform_device *pdev)
debugfs_remove_recursive(sr_info->dbg_dir);
pm_runtime_disable(dev);
- clk_unprepare(sr_info->fck);
list_del(&sr_info->node);
}
--
2.25.1
More information about the linux-arm-kernel
mailing list