[PATCH 6.12 530/567] serial: core: Fix serial device initialization

Greg Kroah-Hartman
2026-01-06T17:45:26Z

From: Alexander Stein <alexander.stein@ew.tq-group.com>

commit f54151148b969fb4b62bec8093d255306d20df30 upstream.

During restoring sysfs fwnode information the information of_node_reused
was dropped. This was previously set by device_set_of_node_from_dev().
Add it back manually

Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
Cc: stable <stable@kernel.org>
Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Tested-by: Michael Walle <mwalle@kernel.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Cosmin Tanislav <demonsingur@gmail.com>
Link: https://patch.msgid.link/20251219152813.1893982-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/serial_base_bus.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/tty/serial/serial_base_bus.c
+++ b/drivers/tty/serial/serial_base_bus.c
@@ -74,6 +74,7 @@ static int serial_base_device_init(struc
dev->parent = parent_dev;
dev->bus = &serial_base_bus_type;
dev->release = release;
+ dev->of_node_reused = true;

device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));