Received: by 10.223.185.116 with SMTP id b49csp5312280wrg; Wed, 7 Mar 2018 09:38:05 -0800 (PST) X-Google-Smtp-Source: AG47ELuE52WFlGt7TwHv77AL8CtsYo5gs6FbbLtFDokLKQMfoDhCcAFCUWq7SaQ+ttlFY8/IC81H X-Received: by 2002:a17:902:225:: with SMTP id 34-v6mr21237835plc.415.1520444285257; Wed, 07 Mar 2018 09:38:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520444285; cv=none; d=google.com; s=arc-20160816; b=DYwOTNeTR7+CydPH9niPywATIBfg6OXz6OUMLu1AIBAxdPoupRIqs6c382Gy3lEqLC ZIqXOJ2B7bCrDrbNHMCh8ZyiQMSwFYxNhP+EOegDaet0JqsL1uEdCTrlCJSZdqz5rrmc wxRFyo6RXAXw+AImQP9J1qH9FAxa/TyshH7M6SBd32WKq3BphhFiLBmFg64Q2S9Y5oOz oawirePs/GuVb9qqObTcm1feIL4dlN5LngBJWabby0Vg94H5h5KzlGjWHsqLHvBjoj+h JWBrKuiOmhkG9yDkgnj8l2d5coDtd5Ly5Rzlv6KIFfNheLvGd5rNz8dKs8bBJ+UffY0/ XndQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=kwlJpcijYP4OCB6vfHphtOv48JRJyHNaz7KSSlMrN3k=; b=Jz/n9j6rQf/I6KKwiLkn4MXhEVsvITaqd7+AzKxUDTEFbvJoFd5JZ3lCe7QOLoZWRq lPf7n8yg1ZCVPnOFdysf9xH5xFX31jt6hbY7h0qdDd2rx87oYPIQAJXEWW8WGYhwMTrb Hl4vVnnHeFbbOz855R2n82iWUsRso3tMtmGYHw/uTbsDIhOdhwWwRRHZ6IWuZl53yrpj JJiIZYkeMOnLbEIGkVycfdR1IZbs09LA7+5nvMYrpAr9Nisk0CxQp9et+4eO77/xLYuI dKE16Bmnky9rYPbtXY1craS64tQE6IcOgZ5riYWd7NeRvhYdefnm1g6wJdzjsa74KzVM Wisg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si14166647pfb.377.2018.03.07.09.37.50; Wed, 07 Mar 2018 09:38:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934157AbeCGRgY (ORCPT + 99 others); Wed, 7 Mar 2018 12:36:24 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:11287 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934044AbeCGRgT (ORCPT ); Wed, 7 Mar 2018 12:36:19 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w27HTSJY024082; Wed, 7 Mar 2018 18:35:38 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2gjj610tsj-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 07 Mar 2018 18:35:38 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B75D134; Wed, 7 Mar 2018 17:35:37 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node3.st.com [10.75.127.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9B49C546F; Wed, 7 Mar 2018 17:35:37 +0000 (GMT) Received: from localhost (10.75.127.47) by SFHDAG6NODE3.st.com (10.75.127.18) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 7 Mar 2018 18:35:37 +0100 From: To: , , , , , , , , CC: Subject: [PATCH v4 1/3] tty: st-asc: Update tty alias Date: Wed, 7 Mar 2018 18:35:32 +0100 Message-ID: <1520444134-30144-2-git-send-email-patrice.chotard@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520444134-30144-1-git-send-email-patrice.chotard@st.com> References: <1520444134-30144-1-git-send-email-patrice.chotard@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG4NODE2.st.com (10.75.127.11) To SFHDAG6NODE3.st.com (10.75.127.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-07_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Patrice Chotard 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 Reviewed-by: Rob Herring --- v4: _ add Reviewed-by v3: _ update st-asc driver with "serial" alias prefix and keep "ttyAS" in second choice v2: _ update st-asc driver with "serial" alias prefix drivers/tty/serial/st-asc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 1.9.1