Skip to content
Commit 9f25e07b authored by Vladimir Murzin's avatar Vladimir Murzin Committed by Greg Kroah-Hartman
Browse files

serial: mps2-uart: move to dynamic port allocation



Some designs, like MPS3, expose number of virtual serial ports which
already close or exceeds MPS2_MAX_PORTS. Increasing MPS2_MAX_PORTS
would have negative impact (in terms of memory consumption) on tiny
MPS2 platform which, in fact, has only one physically populated UART.

Start with converting existent static port array to idr. As a bonus it
make driver not to fail in case when no alias was specified in device
tree.

Note: there is no need in idr_destroy() because code doesn't unload
since ce871229 ("serial: mps2-uart: make driver explicitly non-modular")

Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3c635e4f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment