aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/bus.c6
-rw-r--r--drivers/pci/hotplug/pci_hotplug_core.c5
2 files changed, 10 insertions, 1 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)
935} 935}
936EXPORT_SYMBOL_GPL(bus_unregister_notifier); 936EXPORT_SYMBOL_GPL(bus_unregister_notifier);
937 937
938struct kset *bus_get_kset(struct bus_type *bus)
939{
940 return &bus->subsys;
941}
942EXPORT_SYMBOL_GPL(bus_get_kset);
943
938int __init buses_init(void) 944int __init buses_init(void)
939{ 945{
940 bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL); 946 bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
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,
699static int __init pci_hotplug_init (void) 699static 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");