nvidia-oot: 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: Ifa0a92a282151ce12dc4a48f4f4b5b9499d3fbd8
Signed-off-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2976600
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Shardar Mohammed
2023-09-07 20:13:18 +00:00
committed by mobile promotions
parent a7810cdbac
commit 4be2dd36bb
15 changed files with 69 additions and 1 deletions

View File

@@ -1030,7 +1030,11 @@ static int nvpps_probe(struct platform_device *pdev)
/* character device setup */
#ifndef NVPPS_NO_DT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
s_nvpps_class = class_create("nvpps");
#else
s_nvpps_class = class_create(THIS_MODULE, "nvpps");
#endif
if (IS_ERR(s_nvpps_class)) {
dev_err(&pdev->dev, "failed to allocate class\n");
return PTR_ERR(s_nvpps_class);
@@ -1241,7 +1245,11 @@ static int __init nvpps_init(void)
printk("%s\n", __FUNCTION__);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
s_nvpps_class = class_create("nvpps");
#else
s_nvpps_class = class_create(THIS_MODULE, "nvpps");
#endif
if (IS_ERR(s_nvpps_class)) {
printk("nvpps: failed to allocate class\n");
return PTR_ERR(s_nvpps_class);