[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220422014411.4F96BC385A7@smtp.kernel.org>
Date: Thu, 21 Apr 2022 18:44:09 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Abel Vesa <abel.vesa@....com>, Dong Aisheng <aisheng.dong@....com>,
Fabio Estevam <festevam@...il.com>,
Miaoqian Lin <linmq006@...il.com>,
Michael Turquette <mturquette@...libre.com>,
NXP Linux Team <linux-imx@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: linmq006@...il.com
Subject: Re: [PATCH v2] clk: imx: scu: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
Quoting Miaoqian Lin (2022-04-21 18:33:16)
> If the device is already in a runtime PM enabled state
> pm_runtime_get_sync() will return 1.
>
> Also, 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: 78edeb080330 ("clk: imx: scu: add runtime pm support")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> ---
Please don't send patches as replies to previous versions of the patch.
> drivers/clk/imx/clk-scu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
> index 083da31dc3ea..2044e62980e3 100644
> --- a/drivers/clk/imx/clk-scu.c
> +++ b/drivers/clk/imx/clk-scu.c
> @@ -528,7 +528,7 @@ static int imx_clk_scu_probe(struct platform_device *pdev)
> pm_runtime_use_autosuspend(&pdev->dev);
> pm_runtime_enable(dev);
>
> - ret = pm_runtime_get_sync(dev);
> + ret = pm_runtime_resume_and_get(dev);
> if (ret) {
> pm_genpd_remove_device(dev);
> pm_runtime_disable(dev);
> --
> 2.17.1
>
Powered by blists - more mailing lists