diff options
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_intf.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index b6ae6e9a9c5f..7855f9f45b8e 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -320,6 +320,7 @@ static int unload_when_empty = 1; | |||
320 | static int add_smi(struct smi_info *smi); | 320 | static int add_smi(struct smi_info *smi); |
321 | static int try_smi_init(struct smi_info *smi); | 321 | static int try_smi_init(struct smi_info *smi); |
322 | static void cleanup_one_si(struct smi_info *to_clean); | 322 | static void cleanup_one_si(struct smi_info *to_clean); |
323 | static void cleanup_ipmi_si(void); | ||
323 | 324 | ||
324 | static ATOMIC_NOTIFIER_HEAD(xaction_notifier_list); | 325 | static ATOMIC_NOTIFIER_HEAD(xaction_notifier_list); |
325 | static int register_xaction_notifier(struct notifier_block *nb) | 326 | static int register_xaction_notifier(struct notifier_block *nb) |
@@ -3450,16 +3451,7 @@ static int __devinit init_ipmi_si(void) | |||
3450 | mutex_lock(&smi_infos_lock); | 3451 | mutex_lock(&smi_infos_lock); |
3451 | if (unload_when_empty && list_empty(&smi_infos)) { | 3452 | if (unload_when_empty && list_empty(&smi_infos)) { |
3452 | mutex_unlock(&smi_infos_lock); | 3453 | mutex_unlock(&smi_infos_lock); |
3453 | #ifdef CONFIG_PCI | 3454 | cleanup_ipmi_si(); |
3454 | if (pci_registered) | ||
3455 | pci_unregister_driver(&ipmi_pci_driver); | ||
3456 | #endif | ||
3457 | |||
3458 | #ifdef CONFIG_PPC_OF | ||
3459 | if (of_registered) | ||
3460 | of_unregister_platform_driver(&ipmi_of_platform_driver); | ||
3461 | #endif | ||
3462 | driver_unregister(&ipmi_driver.driver); | ||
3463 | printk(KERN_WARNING PFX | 3455 | printk(KERN_WARNING PFX |
3464 | "Unable to find any System Interface(s)\n"); | 3456 | "Unable to find any System Interface(s)\n"); |
3465 | return -ENODEV; | 3457 | return -ENODEV; |