Commit f9048217 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Bjorn Andersson

clk: qcom: lpasscc-sc7280: switch to devm_pm_runtime_enable

Switch to using the devm_pm_runtime_enable() instead of hand-coding
corresponding action to call pm_runtime_disable().
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230103145515.1164020-21-dmitry.baryshkov@linaro.org
parent b69069c3
...@@ -107,10 +107,13 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev) ...@@ -107,10 +107,13 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
const struct qcom_cc_desc *desc; const struct qcom_cc_desc *desc;
int ret; int ret;
pm_runtime_enable(&pdev->dev); ret = devm_pm_runtime_enable(&pdev->dev);
if (ret)
return ret;
ret = pm_clk_create(&pdev->dev); ret = pm_clk_create(&pdev->dev);
if (ret) if (ret)
goto disable_pm_runtime; return ret;
ret = pm_clk_add(&pdev->dev, "iface"); ret = pm_clk_add(&pdev->dev, "iface");
if (ret < 0) { if (ret < 0) {
...@@ -137,9 +140,6 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev) ...@@ -137,9 +140,6 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
destroy_pm_clk: destroy_pm_clk:
pm_clk_destroy(&pdev->dev); pm_clk_destroy(&pdev->dev);
disable_pm_runtime:
pm_runtime_disable(&pdev->dev);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment