Skip to content

Commit 461edcf

Browse files
glneomathieupoirier
authored andcommitted
remoteproc: wkup_m3: Use devm_pm_runtime_enable() helper
Use device life-cycle managed runtime enable function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250814153940.670564-1-afd@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent ac4393a commit 461edcf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/remoteproc/wkup_m3_rproc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ static int wkup_m3_rproc_probe(struct platform_device *pdev)
148148
return -ENODEV;
149149
}
150150

151-
pm_runtime_enable(&pdev->dev);
151+
ret = devm_pm_runtime_enable(dev);
152+
if (ret < 0)
153+
return dev_err_probe(dev, ret, "Failed to enable runtime PM\n");
152154
ret = pm_runtime_get_sync(&pdev->dev);
153155
if (ret < 0) {
154156
dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n");
@@ -219,7 +221,6 @@ static int wkup_m3_rproc_probe(struct platform_device *pdev)
219221
rproc_free(rproc);
220222
err:
221223
pm_runtime_put_noidle(dev);
222-
pm_runtime_disable(dev);
223224
return ret;
224225
}
225226

@@ -230,7 +231,6 @@ static void wkup_m3_rproc_remove(struct platform_device *pdev)
230231
rproc_del(rproc);
231232
rproc_free(rproc);
232233
pm_runtime_put_sync(&pdev->dev);
233-
pm_runtime_disable(&pdev->dev);
234234
}
235235

236236
#ifdef CONFIG_PM

0 commit comments

Comments
 (0)