From 08b0adb1ae5456a7785ac3c8fdfdc351206f99c3 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Tue, 22 Jun 2021 00:15:28 +0300 Subject: [PATCH] serial: qcom_geni_serial: use DT aliases according to DT bindings Device tree bindings do not specify "hsuart" aliases, instead all serial ports should use "serial" alias name as noted by Rob Herring [1]. Make qcom_geni_serial driver use "serial" alias and fallback to "hsuart" if one is not found. [1] https://lore.kernel.org/linux-arm-msm/6dd1f5cd-03c7-5945-9fa2-1c2698405110@linaro.org/ Cc: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210621211528.1607516-1-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/qcom_geni_serial.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 379ab15..aedc388 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -1340,7 +1340,9 @@ static int qcom_geni_serial_probe(struct platform_device *pdev) line = of_alias_get_id(pdev->dev.of_node, "serial"); } else { drv = &qcom_geni_uart_driver; - line = of_alias_get_id(pdev->dev.of_node, "hsuart"); + line = of_alias_get_id(pdev->dev.of_node, "serial"); + if (line == -ENODEV) /* compat with non-standard aliases */ + line = of_alias_get_id(pdev->dev.of_node, "hsuart"); } port = get_port_from_line(line, console); -- 2.7.4