Re: [PATCH] mfd: core: Remove software node after unregistering platform device

From: Julio Cesar Martinez Cibrian

Date: Fri Dec 04 2026 - 17:29:38 EST


Hi Andy, Dmitry,

Thanks for the guidance. I applied Dmitry's series and tested the
plain removal reorder in mfd_remove_devices_fn() (without the v1
shared_fwnode workaround) on top of it on my Intel LPSS /
i2c-designware system: 10 intel-lpss + 3 i2c_designware unbind/bind
cycles, plus the platform-device-swnode, property-entry and
software-node-links KUnit tests. Everything passes cleanly, with no
sysfs duplicate-filename warnings and no -EBUSY on rebind.

Dmitry, feel free to add to your series:

Tested-by: Cesar Cibrian <cesarcibrian.ai@xxxxxxxxx>

Moving device_remove_software_node() after platform_device_unregister()
strictly depends on Dmitry's patch 1/3: without it, a shared ACPI
primary node is left with a dangling fn->secondary, leading to a
use-after-free on rebind. So the two must not be applied out of order.

How would you prefer to handle it? Dmitry, would you like to carry it
as 4/4 in your v2? Otherwise I can send it separately with the hard
dependency stated in the commit message. Lee, do you have a preference
from the MFD side?

Best regards,
Cesar