From 7d90e81a2d5edbd04037100bdd54d955bdd9b0d0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 31 Mar 2023 11:33:12 +0200 Subject: driver core: core: move to use class_to_subsys() There are a number of places in core.c that need access to the private subsystem structure of struct class, so move them to use class_to_subsys() instead of accessing it directly. This requires exporting class_to_subsys() out of class.c, but keeping it local to the driver core. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230331093318.82288-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/base/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/base/class.c') diff --git a/drivers/base/class.c b/drivers/base/class.c index 1f12bd5d56d9..68a6f9b56d19 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -39,7 +39,7 @@ static struct kset *class_kset; * NULL. A call to subsys_put() must be done when finished with the pointer in * order for it to be properly freed. */ -static struct subsys_private *class_to_subsys(const struct class *class) +struct subsys_private *class_to_subsys(const struct class *class) { struct subsys_private *sp = NULL; struct kobject *kobj; -- cgit v1.2.3