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 | 0fed80f7a63abd7168907267af69ee31f6bcf301 (patch) | |
tree | 2380e2180aa01d883a5c2a2a0528c40f36d23d91 /drivers/pci/hotplug | |
parent | cc972e896b303f453f5893ecf8eca0d0e395ab64 (diff) |
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/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/pci_hotplug_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 0f05e6a68b3b..3606d5b52a70 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -699,9 +699,12 @@ int __must_check pci_hp_change_slot_info(struct hotplug_slot *slot, | |||
699 | static int __init pci_hotplug_init (void) | 699 | static int __init pci_hotplug_init (void) |
700 | { | 700 | { |
701 | int result; | 701 | int result; |
702 | struct kset *pci_bus_kset; | ||
703 | |||
704 | pci_bus_kset = bus_get_kset(&pci_bus_type); | ||
702 | 705 | ||
703 | pci_hotplug_slots_kset = kset_create_and_add("slots", NULL, | 706 | pci_hotplug_slots_kset = kset_create_and_add("slots", NULL, |
704 | &pci_bus_type.subsys.kobj); | 707 | &pci_bus_kset->kobj); |
705 | if (!pci_hotplug_slots_kset) { | 708 | if (!pci_hotplug_slots_kset) { |
706 | result = -ENOMEM; | 709 | result = -ENOMEM; |
707 | err("Register subsys error\n"); | 710 | err("Register subsys error\n"); |