diff options
-rw-r--r-- | drivers/pci/hotplug/shpchp.h | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_core.c | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_sysfs.c | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index dae1543a4e28..abe2cf411e68 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h | |||
@@ -173,6 +173,7 @@ extern void get_hp_params_from_firmware(struct pci_dev *dev, | |||
173 | struct hotplug_params *hpp); | 173 | struct hotplug_params *hpp); |
174 | extern int shpchprm_get_physical_slot_number(struct controller *ctrl, | 174 | extern int shpchprm_get_physical_slot_number(struct controller *ctrl, |
175 | u32 *sun, u8 busnum, u8 devnum); | 175 | u32 *sun, u8 busnum, u8 devnum); |
176 | extern void shpchp_remove_ctrl_files(struct controller *ctrl); | ||
176 | 177 | ||
177 | 178 | ||
178 | /* Global variables */ | 179 | /* Global variables */ |
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index 6a2b4a0193aa..63628e01dd43 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c | |||
@@ -480,6 +480,7 @@ static void __exit unload_shpchpd(void) | |||
480 | ctrl = shpchp_ctrl_list; | 480 | ctrl = shpchp_ctrl_list; |
481 | 481 | ||
482 | while (ctrl) { | 482 | while (ctrl) { |
483 | shpchp_remove_ctrl_files(ctrl); | ||
483 | cleanup_slots(ctrl); | 484 | cleanup_slots(ctrl); |
484 | 485 | ||
485 | kfree (ctrl->pci_bus); | 486 | kfree (ctrl->pci_bus); |
diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c index 807ef66899c7..f5cfbf2c047c 100644 --- a/drivers/pci/hotplug/shpchp_sysfs.c +++ b/drivers/pci/hotplug/shpchp_sysfs.c | |||
@@ -89,3 +89,8 @@ void shpchp_create_ctrl_files (struct controller *ctrl) | |||
89 | { | 89 | { |
90 | device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); | 90 | device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); |
91 | } | 91 | } |
92 | |||
93 | void shpchp_remove_ctrl_files(struct controller *ctrl) | ||
94 | { | ||
95 | device_remove_file(&ctrl->pci_dev->dev, &dev_attr_ctrl); | ||
96 | } | ||