From 7a5b01c4af54858db8cf036da853e982ebb122f1 Mon Sep 17 00:00:00 2001 From: Shardar Mohammed Date: Thu, 7 Sep 2023 16:59:32 +0000 Subject: [PATCH] nvgpu: class: remove module * from class_create() Remove the module pointer from the class_create() based on following change in core kernel ====== driver core: class: remove module * from class_create() The module pointer in class_create() never actually did anything, and it shouldn't have been requred to be set as a parameter even if it did something. So just remove it and fix up all callers of the function in the kernel tree at the same time. Cc: "Rafael J. Wysocki" Acked-by: Benjamin Tissoires Signed-off-by: Greg Kroah-Hartman ===== Bug 4276500 Change-Id: Ic98eb87651d4038d8278966e7b3bd39988f55086 Signed-off-by: Shardar Mohammed Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2976482 (cherry picked from commit b3b6373c163709a19d880e457199b3b67ca935c2) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3015724 Reviewed-by: Sagar Kamble Reviewed-by: Jonathan Hunter GVS: Gerrit_Virtual_Submit Tested-by: Jonathan Hunter --- drivers/gpu/nvgpu/os/linux/ioctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/nvgpu/os/linux/ioctl.c b/drivers/gpu/nvgpu/os/linux/ioctl.c index 86dbbb376..c158d2f63 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl.c @@ -438,7 +438,11 @@ static struct nvgpu_class *nvgpu_create_class(struct gk20a *g, const char *class return NULL; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)) class->class = class_create(THIS_MODULE, class_name); +#else + class->class = class_create(class_name); +#endif if (IS_ERR(class->class)) { nvgpu_err(g, "failed to create class"); nvgpu_kfree(g, class);