From: Minghao Chi <[email protected]>
Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
---
drivers/soc/ti/pm33xx.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index 7bab4bbaf02d..ce09c42eaed2 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -555,11 +555,9 @@ static int am33xx_pm_probe(struct platform_device *pdev)
#endif /* CONFIG_SUSPEND */
pm_runtime_enable(dev);
- ret = pm_runtime_get_sync(dev);
- if (ret < 0) {
- pm_runtime_put_noidle(dev);
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret < 0)
goto err_pm_runtime_disable;
- }
ret = pm_ops->init(am33xx_do_sram_idle);
if (ret) {
--
2.25.1
On 06:30-20220418, [email protected] wrote:
> From: Minghao Chi <[email protected]>
>
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: Minghao Chi <[email protected]>
Tony: Could you check?
> ---
> drivers/soc/ti/pm33xx.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
> index 7bab4bbaf02d..ce09c42eaed2 100644
> --- a/drivers/soc/ti/pm33xx.c
> +++ b/drivers/soc/ti/pm33xx.c
> @@ -555,11 +555,9 @@ static int am33xx_pm_probe(struct platform_device *pdev)
> #endif /* CONFIG_SUSPEND */
>
> pm_runtime_enable(dev);
> - ret = pm_runtime_get_sync(dev);
> - if (ret < 0) {
> - pm_runtime_put_noidle(dev);
> + ret = pm_runtime_resume_and_get(dev);
> + if (ret < 0)
> goto err_pm_runtime_disable;
> - }
>
> ret = pm_ops->init(am33xx_do_sram_idle);
> if (ret) {
> --
> 2.25.1
>
>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
* Nishanth Menon <[email protected]> [220422 18:37]:
> On 06:30-20220418, [email protected] wrote:
> > From: Minghao Chi <[email protected]>
> >
> > Using pm_runtime_resume_and_get is more appropriate
> > for simplifing code
> >
> > Reported-by: Zeal Robot <[email protected]>
> > Signed-off-by: Minghao Chi <[email protected]>
>
> Tony: Could you check?
Looks good to me:
Reviewed-by: Tony Lindgren <[email protected]>
Hi [email protected],
On Mon, 18 Apr 2022 06:30:59 +0000, [email protected] wrote:
> From: Minghao Chi <[email protected]>
>
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
>
>
I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!
[1/1] soc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
commit: 2b7042500cab7952bdbf4fe4a84de8712b418c36
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
[1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D