driver core: add way to get to bus kset
This allows an easier way to get to the kset associated with a struct bus_type (you have three to choose from...) This will make it easier to move these fields to be dynamic in a future patch. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -935,6 +935,12 @@ int bus_unregister_notifier(struct bus_type *bus, struct notifier_block *nb)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bus_unregister_notifier);
|
||||
|
||||
struct kset *bus_get_kset(struct bus_type *bus)
|
||||
{
|
||||
return &bus->subsys;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bus_get_kset);
|
||||
|
||||
int __init buses_init(void)
|
||||
{
|
||||
bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
|
||||
|
Reference in New Issue
Block a user