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

@@ -434,7 +434,11 @@ static int host1x_uapi_init(struct host1x_uapi *uapi)
if (err)
return err;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
uapi->class = class_create(THIS_MODULE, "host1x-fence");
#else
uapi->class = class_create("host1x-fence");
#endif
if (IS_ERR(uapi->class)) {
err = PTR_ERR(uapi->class);
goto unregister_chrdev_region;

View File

@@ -111,7 +111,11 @@ static struct device *nvhost_client_device_create(struct platform_device *pdev,
struct device *dev;
int err;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
pdata->nvhost_class = class_create(THIS_MODULE, pdev->dev.of_node->name);
#else
pdata->nvhost_class = class_create(pdev->dev.of_node->name);
#endif
if (IS_ERR(pdata->nvhost_class)) {
dev_err(&pdev->dev, "failed to create class\n");
return ERR_CAST(pdata->nvhost_class);