diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-01 22:41:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:33 -0500 |
commit | b249072ee6897fe4f8d461c7bb4b926223263c28 (patch) | |
tree | a6dde5703458677302516145c47f308e52cda189 /drivers/base/bus.c | |
parent | 0fed80f7a63abd7168907267af69ee31f6bcf301 (diff) |
driver core: add way to get to bus device klist
This allows an easier way to get to the device klist 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.
The only user of this is the PCI core which horribly abuses this
interface to rearrange the order of the pci devices. This should be
done using the existing bus device walking functions, but that's left
for future patches.
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 8335a1079b0e..9c9027b2c44e 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -941,6 +941,12 @@ struct kset *bus_get_kset(struct bus_type *bus) | |||
941 | } | 941 | } |
942 | EXPORT_SYMBOL_GPL(bus_get_kset); | 942 | EXPORT_SYMBOL_GPL(bus_get_kset); |
943 | 943 | ||
944 | struct klist *bus_get_device_klist(struct bus_type *bus) | ||
945 | { | ||
946 | return &bus->klist_devices; | ||
947 | } | ||
948 | EXPORT_SYMBOL_GPL(bus_get_device_klist); | ||
949 | |||
944 | int __init buses_init(void) | 950 | int __init buses_init(void) |
945 | { | 951 | { |
946 | bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL); | 952 | bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL); |