Commit 10a03c36 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a46ac9d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -316,7 +316,6 @@ static void vpe_device_release(struct device *cd)

static struct class vpe_class = {
	.name = "vpe",
	.owner = THIS_MODULE,
	.dev_release = vpe_device_release,
	.dev_groups = vpe_groups,
};
+0 −1
Original line number Diff line number Diff line
@@ -537,7 +537,6 @@ static void devlink_dev_release(struct device *dev)

static struct class devlink_class = {
	.name = "devlink",
	.owner = THIS_MODULE,
	.dev_groups = devlink_groups,
	.dev_release = devlink_dev_release,
};
+0 −1
Original line number Diff line number Diff line
@@ -226,7 +226,6 @@ ATTRIBUTE_GROUPS(devcd_class);

static struct class devcd_class = {
	.name		= "devcoredump",
	.owner		= THIS_MODULE,
	.dev_release	= devcd_dev_release,
	.dev_groups	= devcd_dev_groups,
	.class_groups	= devcd_class_groups,
+0 −1
Original line number Diff line number Diff line
@@ -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);
+0 −1
Original line number Diff line number Diff line
@@ -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,
};

Loading