serial: uartps: Use the same dynamic major number for all ports
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Wed, 12 Jun 2019 11:14:38 +0000 (13:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2019 07:34:27 +0000 (09:34 +0200)
commitab262666018de6f4e206b021386b93ed0c164316
tree715ec5bb79dbbf042ca797268478a0b768281b4b
parent6bf4e42f1d19de10800f4483b4bb7945aab283cb
serial: uartps: Use the same dynamic major number for all ports

Let kernel to find out major number dynamically for the first device and
then reuse it for other instances.
This fixes the issue that each uart is registered with a
different major number.

After the patch:
crw-------    1 root     root      253,   0 Jun 10 08:31 /dev/ttyPS0
crw--w----    1 root     root      253,   1 Jan  1  1970 /dev/ttyPS1

Fixes: 024ca329bfb9 ("serial: uartps: Register own uart console and driver structures")
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c