Skip to content

Commit d36f0e9

Browse files
astew-tekgregkh
authored andcommitted
serial: core: restore of_node information in sysfs
Since in v6.8-rc1, the of_node symlink under tty devices is missing. This breaks any udev rules relying on this information. Link the of_node information in the serial controller device with the parent defined in the device tree. This will also apply to the serial device which takes the serial controller as a parent device. Fixes: b286f4e ("serial: core: Move tty and serdev to be children of serial core port device") Cc: [email protected] Signed-off-by: Aidan Stewart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 747b524 commit d36f0e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/tty/serial/serial_base_bus.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ static int serial_base_device_init(struct uart_port *port,
7272
dev->parent = parent_dev;
7373
dev->bus = &serial_base_bus_type;
7474
dev->release = release;
75+
device_set_of_node_from_dev(dev, parent_dev);
7576

7677
if (!serial_base_initialized) {
7778
dev_dbg(port->dev, "uart_add_one_port() called before arch_initcall()?\n");

0 commit comments

Comments
 (0)