Skip to content

Commit

Permalink
tty: st-asc: Update tty alias
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrice Chotard authored and Greg Kroah-Hartman committed Mar 14, 2018
1 parent 1bcda09 commit dfd9190
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/tty/serial/st-asc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dfd9190

Please sign in to comment.