virtio_console: make port class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Tue, 20 Jun 2023 14:37:58 +0000 (16:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jun 2023 08:27:20 +0000 (10:27 +0200)
commit11680fdf29cec560987fc8f6d290a5bfdb73e4e4
tree3f753069991341bfbf6c475232c9e618d7d08f58
parent98ab58a7a0b08be3f5ebdcb44fdf49127f749970
virtio_console: make port class a static const structure

Now that the driver core allows for struct class to be in read-only
memory, remove the class field of the ports_driver_data structure and
create the port_class static class structure declared at build time
which places it into read-only memory, instead of having it to be
dynamically allocated at load time.

Cc: Amit Shah <amit@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: virtualization@lists.linux-foundation.org
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230620143751.578239-16-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/virtio_console.c