tty/serial: of_serial: add DT alias ID handling
Add support for alias parsing from the DT. This allows for consistent tty numbering. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: linux-serial@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e9cef8625e
commit
6d01bb9dc8
@ -128,6 +128,10 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
|
||||
if (of_find_property(np, "no-loopback-test", NULL))
|
||||
port->flags |= UPF_SKIP_TEST;
|
||||
|
||||
ret = of_alias_get_id(np, "serial");
|
||||
if (ret >= 0)
|
||||
port->line = ret;
|
||||
|
||||
port->dev = &ofdev->dev;
|
||||
|
||||
switch (type) {
|
||||
|
Loading…
Reference in New Issue
Block a user