diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2018-03-07 18:35:32 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-14 14:57:04 +0100 |
commit | dfd9190ce8f4c96076849fe4d1ad7dbe3b92bb3d (patch) | |
tree | b45cefd992d4d400a2d21d35934e32a2659cdd7c /drivers/tty | |
parent | serial: stm32: add support for RS485 hardware control mode (diff) | |
download | linux-dfd9190ce8f4c96076849fe4d1ad7dbe3b92bb3d.tar.xz linux-dfd9190ce8f4c96076849fe4d1ad7dbe3b92bb3d.zip |
tty: st-asc: Update tty alias
Since dtc v1.4.6-9-gaadd0b65c987, aliases property name
must include only lowercase and '-'.
After having updated all STi boards serial aliases from "ttyASN"
to "serialN", st-asc driver need to be updated accordingly as tty
aliases id is retrieved using of_alias_get_id().
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/st-asc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index c763253514e9..5f9f01fac6dd 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -782,7 +782,9 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev) if (!np) return NULL; - id = of_alias_get_id(np, ASC_SERIAL_NAME); + id = of_alias_get_id(np, "serial"); + if (id < 0) + id = of_alias_get_id(np, ASC_SERIAL_NAME); if (id < 0) id = 0; |