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" <rafael@kernel.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
=====

Bug 4276500

Change-Id: Ic98eb87651d4038d8278966e7b3bd39988f55086
Signed-off-by: Shardar Mohammed <smohammed@nvidia.com>
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 <skamble@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
This commit is contained in:
Shardar Mohammed
2023-09-07 16:59:32 +00:00
committed by mobile promotions
parent 9feb9ea742
commit 7a5b01c4af

View File

@@ -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);