projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9cef86
)
tty/serial: of_serial: add DT alias ID handling
author
Rob Herring
<
[email protected]
>
Tue, 27 Jan 2015 04:50:07 +0000
(22:50 -0600)
committer
Greg Kroah-Hartman
<
[email protected]
>
Mon, 2 Feb 2015 18:11:27 +0000
(10:11 -0800)
Add support for alias parsing from the DT. This allows for consistent
tty numbering.
Signed-off-by: Rob Herring <
[email protected]
>
Cc: Greg Kroah-Hartman <
[email protected]
>
Cc: Jiri Slaby <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/tty/serial/of_serial.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/of_serial.c
b/drivers/tty/serial/of_serial.c
index 64f1bab7e9d75e7bcaeda1ff40bea99d7a928d4e..3194b42c97c0d3c0ecc8be50911706de9e069fe5 100644
(file)
--- 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,
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) {