aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c4
-rw-r--r--drivers/pci/hotplug/pci_hotplug_core.c23
-rw-r--r--drivers/pci/hotplug/rpadlpar_sysfs.c2
-rw-r--r--include/linux/pci_hotplug.h2
4 files changed, 15 insertions, 16 deletions
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index 47d26b65e99a..750ebd7a4c10 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -429,7 +429,7 @@ static int __init ibm_acpiphp_init(void)
429 int retval = 0; 429 int retval = 0;
430 acpi_status status; 430 acpi_status status;
431 struct acpi_device *device; 431 struct acpi_device *device;
432 struct kobject *sysdir = &pci_hotplug_slots_subsys.kobj; 432 struct kobject *sysdir = &pci_hotplug_slots_kset->kobj;
433 433
434 dbg("%s\n", __FUNCTION__); 434 dbg("%s\n", __FUNCTION__);
435 435
@@ -476,7 +476,7 @@ init_return:
476static void __exit ibm_acpiphp_exit(void) 476static void __exit ibm_acpiphp_exit(void)
477{ 477{
478 acpi_status status; 478 acpi_status status;
479 struct kobject *sysdir = &pci_hotplug_slots_subsys.kobj; 479 struct kobject *sysdir = &pci_hotplug_slots_kset->kobj;
480 480
481 dbg("%s\n", __FUNCTION__); 481 dbg("%s\n", __FUNCTION__);
482 482
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index ce1cff0fdeca..175e0c8599e3 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -61,7 +61,7 @@ static int debug;
61 61
62static LIST_HEAD(pci_hotplug_slot_list); 62static LIST_HEAD(pci_hotplug_slot_list);
63 63
64struct kset pci_hotplug_slots_subsys; 64struct kset *pci_hotplug_slots_kset;
65 65
66static ssize_t hotplug_slot_attr_show(struct kobject *kobj, 66static ssize_t hotplug_slot_attr_show(struct kobject *kobj,
67 struct attribute *attr, char *buf) 67 struct attribute *attr, char *buf)
@@ -96,8 +96,6 @@ static struct kobj_type hotplug_slot_ktype = {
96 .release = &hotplug_slot_release, 96 .release = &hotplug_slot_release,
97}; 97};
98 98
99decl_subsys_name(pci_hotplug_slots, slots, NULL);
100
101/* these strings match up with the values in pci_bus_speed */ 99/* these strings match up with the values in pci_bus_speed */
102static char *pci_bus_speed_strings[] = { 100static char *pci_bus_speed_strings[] = {
103 "33 MHz PCI", /* 0x00 */ 101 "33 MHz PCI", /* 0x00 */
@@ -633,7 +631,7 @@ int pci_hp_register (struct hotplug_slot *slot)
633 } 631 }
634 632
635 kobject_set_name(&slot->kobj, "%s", slot->name); 633 kobject_set_name(&slot->kobj, "%s", slot->name);
636 slot->kobj.kset = &pci_hotplug_slots_subsys; 634 slot->kobj.kset = pci_hotplug_slots_kset;
637 slot->kobj.ktype = &hotplug_slot_ktype; 635 slot->kobj.ktype = &hotplug_slot_ktype;
638 636
639 /* this can fail if we have already registered a slot with the same name */ 637 /* this can fail if we have already registered a slot with the same name */
@@ -702,10 +700,11 @@ static int __init pci_hotplug_init (void)
702{ 700{
703 int result; 701 int result;
704 702
705 pci_hotplug_slots_subsys.kobj.kset = &pci_bus_type.subsys; 703 pci_hotplug_slots_kset = kset_create_and_add("slots", NULL,
706 result = subsystem_register(&pci_hotplug_slots_subsys); 704 &pci_bus_type.subsys.kobj);
707 if (result) { 705 if (!pci_hotplug_slots_kset) {
708 err("Register subsys with error %d\n", result); 706 result = -ENOMEM;
707 err("Register subsys error\n");
709 goto exit; 708 goto exit;
710 } 709 }
711 result = cpci_hotplug_init(debug); 710 result = cpci_hotplug_init(debug);
@@ -716,9 +715,9 @@ static int __init pci_hotplug_init (void)
716 715
717 info (DRIVER_DESC " version: " DRIVER_VERSION "\n"); 716 info (DRIVER_DESC " version: " DRIVER_VERSION "\n");
718 goto exit; 717 goto exit;
719 718
720err_subsys: 719err_subsys:
721 subsystem_unregister(&pci_hotplug_slots_subsys); 720 kset_unregister(pci_hotplug_slots_kset);
722exit: 721exit:
723 return result; 722 return result;
724} 723}
@@ -726,7 +725,7 @@ exit:
726static void __exit pci_hotplug_exit (void) 725static void __exit pci_hotplug_exit (void)
727{ 726{
728 cpci_hotplug_exit(); 727 cpci_hotplug_exit();
729 subsystem_unregister(&pci_hotplug_slots_subsys); 728 kset_unregister(pci_hotplug_slots_kset);
730} 729}
731 730
732module_init(pci_hotplug_init); 731module_init(pci_hotplug_init);
@@ -738,7 +737,7 @@ MODULE_LICENSE("GPL");
738module_param(debug, bool, 0644); 737module_param(debug, bool, 0644);
739MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); 738MODULE_PARM_DESC(debug, "Debugging mode enabled or not");
740 739
741EXPORT_SYMBOL_GPL(pci_hotplug_slots_subsys); 740EXPORT_SYMBOL_GPL(pci_hotplug_slots_kset);
742EXPORT_SYMBOL_GPL(pci_hp_register); 741EXPORT_SYMBOL_GPL(pci_hp_register);
743EXPORT_SYMBOL_GPL(pci_hp_deregister); 742EXPORT_SYMBOL_GPL(pci_hp_deregister);
744EXPORT_SYMBOL_GPL(pci_hp_change_slot_info); 743EXPORT_SYMBOL_GPL(pci_hp_change_slot_info);
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c
index 76090937c758..5c3ddb60a002 100644
--- a/drivers/pci/hotplug/rpadlpar_sysfs.c
+++ b/drivers/pci/hotplug/rpadlpar_sysfs.c
@@ -130,7 +130,7 @@ struct kobj_type ktype_dlpar_io = {
130 130
131struct kset dlpar_io_kset = { 131struct kset dlpar_io_kset = {
132 .kobj = {.ktype = &ktype_dlpar_io, 132 .kobj = {.ktype = &ktype_dlpar_io,
133 .parent = &pci_hotplug_slots_subsys.kobj}, 133 .parent = &pci_hotplug_slots_kset->kobj},
134}; 134};
135 135
136int dlpar_sysfs_init(void) 136int dlpar_sysfs_init(void)
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index ab4cb6ecd47c..8f67e8f2a3cc 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -174,7 +174,7 @@ extern int pci_hp_register (struct hotplug_slot *slot);
174extern int pci_hp_deregister (struct hotplug_slot *slot); 174extern int pci_hp_deregister (struct hotplug_slot *slot);
175extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, 175extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot,
176 struct hotplug_slot_info *info); 176 struct hotplug_slot_info *info);
177extern struct kset pci_hotplug_slots_subsys; 177extern struct kset *pci_hotplug_slots_kset;
178 178
179/* PCI Setting Record (Type 0) */ 179/* PCI Setting Record (Type 0) */
180struct hpp_type0 { 180struct hpp_type0 {