[PATCH] mfd: core: Preserve OF node when ACPI handle is present
From: Brian Mak
Date: Wed Feb 25 2026 - 18:32:47 EST
Switch device_set_node back to ACPI_COMPANION_SET, so that the ACPI
fwnode does not overwrite the of_node with NULL.
This allows MFD children with both OF nodes and ACPI handles to have OF
nodes again.
Fixes: 51e3b257099d ("mfd: core: Make use of device_set_node()")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Brian Mak <makb@xxxxxxxxxxx>
---
drivers/mfd/mfd-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 6be58eb5a746..3c8b06d52d19 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -88,7 +88,7 @@ static void mfd_acpi_add_device(const struct mfd_cell *cell,
}
}
- device_set_node(&pdev->dev, acpi_fwnode_handle(adev ?: parent));
+ ACPI_COMPANION_SET(&pdev->dev, adev ?: parent);
}
#else
static inline void mfd_acpi_add_device(const struct mfd_cell *cell,
base-commit: d9d32e5bd5a4e57675f2b70ddf73c3dc5cf44fc2
--
2.25.1