]> git.ipfire.org Git - thirdparty/linux.git/commit
vfio: replace vfio->class with a const struct class
authorJori Koolstra <jkoolstra@xs4all.nl>
Fri, 6 Mar 2026 19:06:28 +0000 (20:06 +0100)
committerAlex Williamson <alex@shazbot.org>
Mon, 16 Mar 2026 19:38:50 +0000 (13:38 -0600)
commit5efa9a54c6a5f22080f33012c41a94112e955b53
tree2a3b5ffaebf0ee2f80cb6b0842beb3dc8c257536
parentf183963891b4b0126f19aa0993ed931f3f3f9520
vfio: replace vfio->class with a const struct class

The class_create() call has been deprecated in favor of class_register()
as the driver core now allows for a struct class to be in read-only
memory. Replace vfio->class with a const struct class and drop the
class_create() call.

Compile tested and found no errors/warns in dmesg after enabling
VFIO_GROUP.

Link: https://lore.kernel.org/all/2023040244-duffel-pushpin-f738@gregkh/
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Link: https://lore.kernel.org/r/20260306190628.259203-1-jkoolstra@xs4all.nl
Signed-off-by: Alex Williamson <alex@shazbot.org>
drivers/vfio/group.c