aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorye xingchen <[email protected]>2022-08-02 07:46:43 +0000
committerWim Van Sebroeck <[email protected]>2022-10-02 12:55:43 +0200
commita1f136fd8725243a69681e4e20e29f7b2043ad93 (patch)
treeae978327402185dd0da8f46985d26e6a5fa44c0e
parent5946401e25b36f755f401447e3ffb6d0e6a3769a (diff)
watchdog: rti-wdt:using the pm_runtime_resume_and_get to simplify the code
Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync and pm_runtime_put_noidle. Reported-by: Zeal Robot <[email protected]> Signed-off-by: ye xingchen <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
-rw-r--r--drivers/watchdog/rti_wdt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
index 053ef3bde12d..6e9253761fc1 100644
--- a/drivers/watchdog/rti_wdt.c
+++ b/drivers/watchdog/rti_wdt.c
@@ -225,9 +225,8 @@ static int rti_wdt_probe(struct platform_device *pdev)
wdt->freq = wdt->freq * 9 / 10;
pm_runtime_enable(dev);
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret < 0) {
- pm_runtime_put_noidle(dev);
pm_runtime_disable(&pdev->dev);
return dev_err_probe(dev, ret, "runtime pm failed\n");
}