lkml.org 
[lkml]   [2018]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 3/3] tty: st-asc: Update tty alias
Date
Hi Rob

On 03/06/2018 02:29 PM, Rob Herring wrote:
> On Tue, Mar 6, 2018 at 2:07 AM, <patrice.chotard@st.com> wrote:
>> From: Patrice Chotard <patrice.chotard@st.com>
>>
>> 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(np, ASC_SERIAL_NAME);
>
> Again, changing the tty name breaks userspace. You can't do that.
>
> You need to do something like this:
>
> 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;
>
I will fix this too

Patrice
\
 
 \ /
  Last update: 2018-03-07 09:03    [W:0.038 / U:3.624 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site