diff options
author | Petr Mladek <pmladek@suse.com> | 2021-11-02 10:39:27 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2021-11-02 10:39:27 +0100 |
commit | 40e64a88dadcfa168914065baf7f035de957bbe0 (patch) | |
tree | 06c8c4a9e6c1b478aa6851794c6a33bec1ce6ec4 /drivers/clk/qcom/camcc-sc7180.c | |
parent | lib/vsprintf.c: Amend static asserts for format specifier flags (diff) | |
parent | vsprintf: Update %pGp documentation about that it prints hex value (diff) | |
download | linux-40e64a88dadcfa168914065baf7f035de957bbe0.tar.xz linux-40e64a88dadcfa168914065baf7f035de957bbe0.zip |
Merge branch 'for-5.16-vsprintf-pgp' into for-linus
Diffstat (limited to 'drivers/clk/qcom/camcc-sc7180.c')
-rw-r--r-- | drivers/clk/qcom/camcc-sc7180.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/clk/qcom/camcc-sc7180.c b/drivers/clk/qcom/camcc-sc7180.c index 9bcf2f8ed4de..ce73ee9037cb 100644 --- a/drivers/clk/qcom/camcc-sc7180.c +++ b/drivers/clk/qcom/camcc-sc7180.c @@ -1652,32 +1652,35 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev) struct regmap *regmap; int ret; - pm_runtime_enable(&pdev->dev); - ret = pm_clk_create(&pdev->dev); + ret = devm_pm_runtime_enable(&pdev->dev); + if (ret < 0) + return ret; + + ret = devm_pm_clk_create(&pdev->dev); if (ret < 0) return ret; ret = pm_clk_add(&pdev->dev, "xo"); if (ret < 0) { dev_err(&pdev->dev, "Failed to acquire XO clock\n"); - goto disable_pm_runtime; + return ret; } ret = pm_clk_add(&pdev->dev, "iface"); if (ret < 0) { dev_err(&pdev->dev, "Failed to acquire iface clock\n"); - goto disable_pm_runtime; + return ret; } ret = pm_runtime_get(&pdev->dev); if (ret) - goto destroy_pm_clk; + return ret; regmap = qcom_cc_map(pdev, &cam_cc_sc7180_desc); if (IS_ERR(regmap)) { ret = PTR_ERR(regmap); pm_runtime_put(&pdev->dev); - goto destroy_pm_clk; + return ret; } clk_fabia_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config); @@ -1689,18 +1692,10 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev) pm_runtime_put(&pdev->dev); if (ret < 0) { dev_err(&pdev->dev, "Failed to register CAM CC clocks\n"); - goto destroy_pm_clk; + return ret; } return 0; - -destroy_pm_clk: - pm_clk_destroy(&pdev->dev); - -disable_pm_runtime: - pm_runtime_disable(&pdev->dev); - - return ret; } static const struct dev_pm_ops cam_cc_pm_ops = { |