diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2021-07-31 22:50:34 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2021-08-26 21:28:11 +0300 |
commit | 72cfc73f4663abe0b5c420d255c932ae5e7c126d (patch) | |
tree | 201716269fdee6ed2c7b09e321e70cbfd35fd167 /drivers/clk/qcom/lpass-gfm-sm8250.c | |
parent | a649136b17af6361355874a10e9219390c266a2c (diff) | |
download | linux-72cfc73f4663abe0b5c420d255c932ae5e7c126d.tar.xz |
clk: qcom: use devm_pm_runtime_enable and devm_pm_clk_create
Use two new helpers instead of pm_runtime_enable() and pm_clk_create(),
removing the need for calling pm_runtime_disable and pm_clk_destroy().
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20210731195034.979084-4-dmitry.baryshkov@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/qcom/lpass-gfm-sm8250.c')
-rw-r--r-- | drivers/clk/qcom/lpass-gfm-sm8250.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/clk/qcom/lpass-gfm-sm8250.c b/drivers/clk/qcom/lpass-gfm-sm8250.c index f5e31e692b9b..96f476f24eb2 100644 --- a/drivers/clk/qcom/lpass-gfm-sm8250.c +++ b/drivers/clk/qcom/lpass-gfm-sm8250.c @@ -251,15 +251,18 @@ static int lpass_gfm_clk_driver_probe(struct platform_device *pdev) if (IS_ERR(cc->base)) return PTR_ERR(cc->base); - pm_runtime_enable(dev); - err = pm_clk_create(dev); + err = devm_pm_runtime_enable(dev); if (err) - goto pm_clk_err; + return err; + + err = devm_pm_clk_create(dev); + if (err) + return err; err = of_pm_clk_add_clks(dev); if (err < 0) { dev_dbg(dev, "Failed to get lpass core voting clocks\n"); - goto clk_reg_err; + return err; } for (i = 0; i < data->onecell_data->num; i++) { @@ -273,22 +276,16 @@ static int lpass_gfm_clk_driver_probe(struct platform_device *pdev) err = devm_clk_hw_register(dev, &data->gfm_clks[i]->hw); if (err) - goto clk_reg_err; + return err; } err = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, data->onecell_data); if (err) - goto clk_reg_err; + return err; return 0; - -clk_reg_err: - pm_clk_destroy(dev); -pm_clk_err: - pm_runtime_disable(dev); - return err; } static const struct of_device_id lpass_gfm_clk_match_table[] = { |