Skip to content

Commit 214ae22

Browse files
claudiubezneamathieupoirier
authored andcommitted
rpmsg: core: Drop dev_pm_domain_detach() call
Starting with commit f995080 ("PM: domains: Detach on device_unbind_cleanup()"), there is no longer a need to call dev_pm_domain_detach() in the bus remove function. The device_unbind_cleanup() function now handles this to avoid invoking devres cleanup handlers while the PM domain is powered off, which could otherwise lead to failures as described in the above-mentioned commit. Drop the explicit dev_pm_domain_detach() call and rely instead on the flags passed to dev_pm_domain_attach() to power off the domain. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20250827101352.927542-1-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent 6e29c30 commit 214ae22

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/rpmsg/rpmsg_core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,8 @@ static int rpmsg_dev_probe(struct device *dev)
479479
struct rpmsg_endpoint *ept = NULL;
480480
int err;
481481

482-
err = dev_pm_domain_attach(dev, PD_FLAG_ATTACH_POWER_ON);
482+
err = dev_pm_domain_attach(dev, PD_FLAG_ATTACH_POWER_ON |
483+
PD_FLAG_DETACH_POWER_OFF);
483484
if (err)
484485
goto out;
485486

@@ -538,8 +539,6 @@ static void rpmsg_dev_remove(struct device *dev)
538539
if (rpdrv->remove)
539540
rpdrv->remove(rpdev);
540541

541-
dev_pm_domain_detach(dev, true);
542-
543542
if (rpdev->ept)
544543
rpmsg_destroy_ept(rpdev->ept);
545544
}

0 commit comments

Comments
 (0)