vfio/mbochs: make mbochs_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Fri, 1 Mar 2024 17:51:48 +0000 (14:51 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 5 Mar 2024 22:15:27 +0000 (15:15 -0700)
commit626f534d774caaccd6861fbccee45a1a6a8781b3
treea8e3d08e002da4c88548d0f4a7198c3d0a63a15e
parent1f92d6a7c65f390617463532b408030a5a168097
vfio/mbochs: make mbochs_class constant

Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the mbochs_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240301-class_cleanup-vfio-v1-2-9236d69083f5@marliere.net
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
samples/vfio-mdev/mbochs.c