aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-13 19:18:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-17 15:16:33 +0100
commit1aaba11da9aa7d7d6b52a74d45b31cac118295a1 (patch)
tree287ccb5bd49ca9a7670d5989bdb926845ffddf84 /samples
parent6e30a66433afee90e902ced95d7136e8f7edcc7e (diff)
downloadlinux-1aaba11da9aa7d7d6b52a74d45b31cac118295a1.tar.gz
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>
Diffstat (limited to 'samples')
-rw-r--r--samples/vfio-mdev/mbochs.c2
-rw-r--r--samples/vfio-mdev/mdpy.c2
-rw-r--r--samples/vfio-mdev/mtty.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
index e54eb752e1ba89..a3d3249639d02f 100644
--- a/samples/vfio-mdev/mbochs.c
+++ b/samples/vfio-mdev/mbochs.c
@@ -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);
diff --git a/samples/vfio-mdev/mdpy.c b/samples/vfio-mdev/mdpy.c
index e8400fdab71daa..ef1630fc5a913c 100644
--- a/samples/vfio-mdev/mdpy.c
+++ b/samples/vfio-mdev/mdpy.c
@@ -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);
diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
index e887de672c526e..0b6c386e620df0 100644
--- a/samples/vfio-mdev/mtty.c
+++ b/samples/vfio-mdev/mtty.c
@@ -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");