public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Miaoqian Lin <linmq006@gmail.com>
To: Stephen Boyd <sboyd@kernel.org>, Abel Vesa <abel.vesa@nxp.com>,
	Dong Aisheng <aisheng.dong@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] clk: imx: scu: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
Date: Fri, 22 Apr 2022 09:59:54 +0800	[thread overview]
Message-ID: <8e893363-3e47-2abe-7111-b3fb0888d4fc@gmail.com> (raw)
In-Reply-To: <20220422014411.4F96BC385A7@smtp.kernel.org>


On 2022/4/22 9:44, Stephen Boyd wrote:
> 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@gmail.com>
>> ---
> Please don't send patches as replies to previous versions of the patch.

Sorry, I thought I should keep them in one thread, to provide the context

for other people to follow up. Am I suppose to resend it?

>>  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
>>

  reply	other threads:[~2022-04-22  2:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  6:57 [PATCH] clk: imx: scu: Fix pm_runtime_get_sync() error checking Miaoqian Lin
2022-04-18 11:54 ` Abel Vesa
2022-04-22  1:20 ` Stephen Boyd
2022-04-22  1:32   ` Miaoqian Lin
2022-04-22  1:33   ` [PATCH v2] clk: imx: scu: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage Miaoqian Lin
2022-04-22  1:44     ` Stephen Boyd
2022-04-22  1:59       ` Miaoqian Lin [this message]
2022-04-23  2:23         ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e893363-3e47-2abe-7111-b3fb0888d4fc@gmail.com \
    --to=linmq006@gmail.com \
    --cc=abel.vesa@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox