diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-01 19:41:16 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 20:40:33 -0800 |
commit | 0fed80f7a63abd7168907267af69ee31f6bcf301 (patch) | |
tree | 2380e2180aa01d883a5c2a2a0528c40f36d23d91 /drivers/base/bus.c | |
parent | cc972e896b303f453f5893ecf8eca0d0e395ab64 (diff) | |
download | linux-stable-0fed80f7a63abd7168907267af69ee31f6bcf301.tar.gz linux-stable-0fed80f7a63abd7168907267af69ee31f6bcf301.tar.bz2 linux-stable-0fed80f7a63abd7168907267af69ee31f6bcf301.zip |
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>
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 871607b7c876..8335a1079b0e 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -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); |