Skip to content

Commit a1f136f

Browse files
ye xingchenWim Van Sebroeck
authored andcommitted
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]>
1 parent 5946401 commit a1f136f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/watchdog/rti_wdt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,8 @@ static int rti_wdt_probe(struct platform_device *pdev)
225225
wdt->freq = wdt->freq * 9 / 10;
226226

227227
pm_runtime_enable(dev);
228-
ret = pm_runtime_get_sync(dev);
228+
ret = pm_runtime_resume_and_get(dev);
229229
if (ret < 0) {
230-
pm_runtime_put_noidle(dev);
231230
pm_runtime_disable(&pdev->dev);
232231
return dev_err_probe(dev, ret, "runtime pm failed\n");
233232
}

0 commit comments

Comments
 (0)