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>
Link: https://lore.kernel.org/r/20230313181843.1207845-4-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman
2023-03-13 19:18:35 +01:00
parent 6e30a66433
commit 1aaba11da9
140 changed files with 144 additions and 145 deletions

View File

@@ -1418,7 +1418,7 @@ static int __init mbochs_dev_init(void)
if (ret)
goto err_cdev;
mbochs_class = class_create(THIS_MODULE, MBOCHS_CLASS_NAME);
mbochs_class = class_create(MBOCHS_CLASS_NAME);
if (IS_ERR(mbochs_class)) {
pr_err("Error: failed to register mbochs_dev class\n");
ret = PTR_ERR(mbochs_class);

View File

@@ -705,7 +705,7 @@ static int __init mdpy_dev_init(void)
if (ret)
goto err_cdev;
mdpy_class = class_create(THIS_MODULE, MDPY_CLASS_NAME);
mdpy_class = class_create(MDPY_CLASS_NAME);
if (IS_ERR(mdpy_class)) {
pr_err("Error: failed to register mdpy_dev class\n");
ret = PTR_ERR(mdpy_class);

View File

@@ -1316,7 +1316,7 @@ static int __init mtty_dev_init(void)
if (ret)
goto err_cdev;
mtty_dev.vd_class = class_create(THIS_MODULE, MTTY_CLASS_NAME);
mtty_dev.vd_class = class_create(MTTY_CLASS_NAME);
if (IS_ERR(mtty_dev.vd_class)) {
pr_err("Error: failed to register mtty_dev class\n");