diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-13 19:18:33 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-17 15:16:27 +0100 |
commit | 10a03c36b7dd7759788ebc613091d313b60f93e0 (patch) | |
tree | 085c46fd6e2a9e6fde35b473ca33493381670e17 /drivers/block | |
parent | driver core: class: specify the module owner in __class_register() (diff) | |
download | linux-10a03c36b7dd7759788ebc613091d313b60f93e0.tar.xz linux-10a03c36b7dd7759788ebc613091d313b60f93e0.zip |
drivers: remove struct module * setting from struct class
There is no need to manually set the owner of a struct class, as the
registering function does it automatically, so remove all of the
explicit settings from various drivers that did so as it is unneeded.
This allows us to remove this pointer entirely from this structure going
forward.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313181843.1207845-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/pktcdvd.c | 1 | ||||
-rw-r--r-- | drivers/block/zram/zram_drv.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 2f1a92509271..642e3377441a 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -417,7 +417,6 @@ static int pkt_sysfs_init(void) if (!class_pktcdvd) return -ENOMEM; class_pktcdvd->name = DRIVER_NAME; - class_pktcdvd->owner = THIS_MODULE; class_pktcdvd->class_release = class_pktcdvd_release; class_pktcdvd->class_groups = class_pktcdvd_groups; ret = class_register(class_pktcdvd); diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index aa490da3cef2..b7bb52f8dfbd 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -2481,7 +2481,6 @@ ATTRIBUTE_GROUPS(zram_control_class); static struct class zram_control_class = { .name = "zram-control", - .owner = THIS_MODULE, .class_groups = zram_control_class_groups, }; |