mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user