diff options
author | Rob Herring <robh@kernel.org> | 2015-01-26 23:50:07 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-02 13:11:27 -0500 |
commit | 6d01bb9dc82a60580f749062a48cb47cd5caca07 (patch) | |
tree | 5b916ccdc960519a8397da9d060863bd42c9699f /drivers | |
parent | e9cef8625e997a5ade9cddd2d501257dfee7cb62 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/of_serial.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index 64f1bab7e9d7..3194b42c97c0 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c | |||
@@ -128,6 +128,10 @@ static int of_platform_serial_setup(struct platform_device *ofdev, | |||
128 | if (of_find_property(np, "no-loopback-test", NULL)) | 128 | if (of_find_property(np, "no-loopback-test", NULL)) |
129 | port->flags |= UPF_SKIP_TEST; | 129 | port->flags |= UPF_SKIP_TEST; |
130 | 130 | ||
131 | ret = of_alias_get_id(np, "serial"); | ||
132 | if (ret >= 0) | ||
133 | port->line = ret; | ||
134 | |||
131 | port->dev = &ofdev->dev; | 135 | port->dev = &ofdev->dev; |
132 | 136 | ||
133 | switch (type) { | 137 | switch (type) { |