]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
virt: coco: change tsm_class to a const struct
authorJori Koolstra <jkoolstra@xs4all.nl>
Fri, 6 Mar 2026 18:33:17 +0000 (19:33 +0100)
committerDan Williams <djbw@kernel.org>
Thu, 2 Apr 2026 22:45:18 +0000 (15:45 -0700)
commit3177779ae17db4c66c851f799505fb95c7530c03
tree4bc88b0f6fe5aeeab797a84ce89aac6c1f8358fb
parentf338e77383789c0cae23ca3d48adcc5e9e137e3c
virt: coco: change tsm_class to a const struct

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. Change tsm_class to be a const struct class and drop the
class_create() call. Compile tested only.

Link: https://lore.kernel.org/all/2023040244-duffel-pushpin-f738@gregkh/
Changes with v1:
- Removed redundant int err variable.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260306183325.245254-1-jkoolstra@xs4all.nl
Signed-off-by: Dan Williams <djbw@kernel.org>
drivers/virt/coco/tsm-core.c