serial: uartlite: Use dynamic allocation for major number when uart ports > 4
authorManikanta Guntupalli <manikanta.guntupalli@amd.com>
Thu, 16 Nov 2023 13:40:03 +0000 (19:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Nov 2023 07:23:16 +0000 (07:23 +0000)
commit01c33b813864ca15a9dec22045ce1a5bb09d5e74
tree8650d4f4cbbbe5150a203b89cda1ce700eb3529c
parent0be916a68c8ada0c98d4c14058717175a367ee87
serial: uartlite: Use dynamic allocation for major number when uart ports > 4

Device number 204 has a range of minors on major number.
uart_register_driver is failing due to lack of minor numbers
when more number of uart ports used. So, to avoid minor number
limitation on 204 major number use dynamic major allocation
when more than 4 uart ports used otherwise use static major
allocation.

https://docs.kernel.org/arch/arm/sa1100/serial_uart.html

Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@amd.com>
Link: https://lore.kernel.org/r/20231116134003.3762725-3-manikanta.guntupalli@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/Kconfig
drivers/tty/serial/uartlite.c