serial: sprd: getting port index via serial aliases only
authorChunyan Zhang <chunyan.zhang@unisoc.com>
Wed, 18 Mar 2020 10:50:48 +0000 (18:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2020 11:20:04 +0000 (12:20 +0100)
commit4b7349cb4e26e79429ecd619eb588bf384f69fdb
tree9eb1402344f9fd7e70e8311bd955219c4519deec
parent630db5cbc7b444bf47cd717906abb092a2ab5724
serial: sprd: getting port index via serial aliases only

This patch simplifies the process of getting serial port number, with
this patch, serial devices must have aliases configured in devicetree.

The serial port searched out via sprd_port array maybe wrong if we don't
have serial alias defined in devicetree, and specify console with command
line, we would get the wrong port number if other serial ports probe
failed before console's. So using aliases is mandatory.

Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lore.kernel.org/r/20200318105049.19623-2-zhang.lyra@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sprd_serial.c