Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rpmsg: core: Drop dev_pm_domain_detach() call

Starting with commit f99508074e78 ("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>

authored by

Claudiu Beznea and committed by
Mathieu Poirier
214ae22e 6e29c30d

+2 -3
+2 -3
drivers/rpmsg/rpmsg_core.c
··· 479 479 struct rpmsg_endpoint *ept = NULL; 480 480 int err; 481 481 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); 483 484 if (err) 484 485 goto out; 485 486 ··· 538 537 539 538 if (rpdrv->remove) 540 539 rpdrv->remove(rpdev); 541 - 542 - dev_pm_domain_detach(dev, true); 543 540 544 541 if (rpdev->ept) 545 542 rpmsg_destroy_ept(rpdev->ept);