summaryrefslogtreecommitdiffstats
path: root/drivers/base/base.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-31 11:33:12 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-31 15:13:35 +0200
commit7d90e81a2d5edbd04037100bdd54d955bdd9b0d0 (patch)
tree893ca890f9b4dbe697809a6f31bfbddcadfe3fd4 /drivers/base/base.h
parentmedia: pvrusb2: clean up unneeded complexity in pvrusb2 class logic (diff)
downloadlinux-7d90e81a2d5edbd04037100bdd54d955bdd9b0d0.tar.xz
linux-7d90e81a2d5edbd04037100bdd54d955bdd9b0d0.zip
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 <rafael@kernel.org> Link: https://lore.kernel.org/r/20230331093318.82288-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r--drivers/base/base.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 2867ca4ee4ce..6296164bb7f3 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -73,6 +73,8 @@ static inline void subsys_put(struct subsys_private *sp)
kset_put(&sp->subsys);
}
+struct subsys_private *class_to_subsys(const struct class *class);
+
struct driver_private {
struct kobject kobj;
struct klist klist_devices;