mxser: alloc struct mxser_board dynamically
authorJiri Slaby <jslaby@suse.cz>
Fri, 18 Jun 2021 06:14:58 +0000 (08:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 11:10:02 +0000 (13:10 +0200)
commitf8b6b327aa73dd69577abd4e164447a9cc124315
tree71b9aa0da6ddb2d27d993242fd069cd63072f4c0
parent13d4aba8a9747c5f88e537cc065a511fe64f92eb
mxser: alloc struct mxser_board dynamically

There is no need to preallocate an array of four struct mxser_board's.
In most cases a single board or two will be present in a machine. So
allocate struct mxser_board as needed in ->probe.

This makes mxser_boards a bit array. There we store which indexes are
free (unallocated).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210618061516.662-53-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c