driver core: core: move to use class_to_subsys()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Mar 2023 09:33:12 +0000 (11:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Mar 2023 13:13:35 +0000 (15:13 +0200)
commit7d90e81a2d5edbd04037100bdd54d955bdd9b0d0
tree893ca890f9b4dbe697809a6f31bfbddcadfe3fd4
parent6332a6ced62ac0c9ad7617be34aa2ee4543a52ab
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>
drivers/base/base.h
drivers/base/class.c
drivers/base/core.c