]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
serial: uartps: Change uart ID port allocation
authorMichal Simek <michal.simek@xilinx.com>
Thu, 20 Sep 2018 11:41:53 +0000 (13:41 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 20 Sep 2018 13:24:03 +0000 (15:24 +0200)
commit906433d51bdaa2b77dedb80be25fccf8c078a824
tree98e46172a4feeeab226b1eb7419d1fa7f4b6995e
parent6f2f749667eddd94900ff227fef4233b36456910
serial: uartps: Change uart ID port allocation

For IPs which have alias algorightm all the time using that alias and
minor number. It means serial20 alias ends up as ttyPS20.

If alias is not setup for probed IP instance the first unused position is
used but that needs to be checked if it is really empty because another
instance doesn't need to be probed at that time. of_alias_get_alias_list()
fills alias bitmap which exactly shows which ID is free.
If alias pointing to different not compatible IP, it is free to use.

cdns_get_id() call is placed below structure allocation to simplify
error path.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/Kconfig
drivers/tty/serial/xilinx_uartps.c