From 10a03c36b7dd7759788ebc613091d313b60f93e0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 13 Mar 2023 19:18:33 +0100 Subject: 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" Link: https://lore.kernel.org/r/20230313181843.1207845-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/base/core.c | 1 - drivers/base/devcoredump.c | 1 - 2 files changed, 2 deletions(-) (limited to 'drivers/base') diff --git a/drivers/base/core.c b/drivers/base/core.c index fe74a786e2c3..57076837b33e 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -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, }; diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c index 1c06781f7114..59aaf2e1375a 100644 --- a/drivers/base/devcoredump.c +++ b/drivers/base/devcoredump.c @@ -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, -- cgit v1.2.3