[PATCH v5 09/17] rtc: rzn1: Use pm_runtime_put_sync()
Prabhakar <[email protected]>
| Newsgroups | org.kernel.vger.linux-rtc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-renesas-soc |
|---|---|
| Message-ID | <[email protected]> |
From: Lad Prabhakar <[email protected]> pm_runtime_put() may trigger the idle check after pm_runtime_disable() is run as part of devm_pm_runtime_enable()'s cleanup action, leaving runtime PM active. Use pm_runtime_put_sync() to ensure the idle check runs synchronously. Signed-off-by: Lad Prabhakar <[email protected]> --- v4->v5: - Updated commit message - Moved the patch prior to the patch that replaces the .remove() callback with devm_add_action_or_reset() v3->v4: - New patch --- drivers/rtc/rtc-rzn1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c index a7f22a491d61..6a434cb418cd 100644 --- a/drivers/rtc/rtc-rzn1.c +++ b/drivers/rtc/rtc-rzn1.c @@ -492,7 +492,7 @@ static int rzn1_rtc_probe(struct platform_device *pdev) return 0; dis_runtime_pm: - pm_runtime_put(&pdev->dev); + pm_runtime_put_sync(&pdev->dev); return ret; } @@ -504,7 +504,7 @@ static void rzn1_rtc_remove(struct platform_device *pdev) /* Disable all interrupts */ writel(0, rtc->base + RZN1_RTC_CTL1); - pm_runtime_put(&pdev->dev); + pm_runtime_put_sync(&pdev->dev); } static const struct of_device_id rzn1_rtc_of_match[] = { -- 2.43.0