From 0fed80f7a63abd7168907267af69ee31f6bcf301 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 1 Nov 2007 19:41:16 -0700 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/pci_hotplug_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/pci/hotplug/pci_hotplug_core.c') 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, static int __init pci_hotplug_init (void) { int result; + struct kset *pci_bus_kset; + + pci_bus_kset = bus_get_kset(&pci_bus_type); pci_hotplug_slots_kset = kset_create_and_add("slots", NULL, - &pci_bus_type.subsys.kobj); + &pci_bus_kset->kobj); if (!pci_hotplug_slots_kset) { result = -ENOMEM; err("Register subsys error\n"); -- cgit v1.2.3