]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
serial: core: Fix serial device initialization
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Fri, 19 Dec 2025 15:28:12 +0000 (16:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Dec 2025 10:53:37 +0000 (11:53 +0100)
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

index 8e891984cdc0df7ce13cf845bc88b21b7f9c3c73..1e1ad28d83fcf7f9be6658df05bc444490a2b3a0 100644 (file)
@@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port,
        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)));