]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
authorYuntao Liu <liuyuntao12@huawei.com>
Thu, 15 Aug 2024 09:38:53 +0000 (09:38 +0000)
committerStephen Boyd <sboyd@kernel.org>
Wed, 28 Aug 2024 20:20:05 +0000 (13:20 -0700)
We need to call pm_runtime_put_noidle() when pm_runtime_get_sync()
fails, so use pm_runtime_resume_and_get() instead. this function
will handle this.

Fixes: dae5448a327ed ("clk: starfive: Add StarFive JH7110 Video-Output clock driver")
Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
Link: https://lore.kernel.org/r/20240815093853.757487-1-liuyuntao12@huawei.com
Reviewed-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/starfive/clk-starfive-jh7110-vout.c

index 53f7af234cc23e79c8253a68109c40e6f99c1e7b..aabd0484ac23f63519116932a7f5c94577bd4799 100644 (file)
@@ -145,7 +145,7 @@ static int jh7110_voutcrg_probe(struct platform_device *pdev)
 
        /* enable power domain and clocks */
        pm_runtime_enable(priv->dev);
-       ret = pm_runtime_get_sync(priv->dev);
+       ret = pm_runtime_resume_and_get(priv->dev);
        if (ret < 0)
                return dev_err_probe(priv->dev, ret, "failed to turn on power\n");