aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_si_intf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_intf.c')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 2da5845a383a..a86c0f29953e 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1014,7 +1014,7 @@ static struct ipmi_smi_handlers handlers =
1014 1014
1015#define SI_MAX_PARMS 4 1015#define SI_MAX_PARMS 4
1016static LIST_HEAD(smi_infos); 1016static LIST_HEAD(smi_infos);
1017static DECLARE_MUTEX(smi_infos_lock); 1017static DEFINE_MUTEX(smi_infos_lock);
1018static int smi_num; /* Used to sequence the SMIs */ 1018static int smi_num; /* Used to sequence the SMIs */
1019 1019
1020#define DEFAULT_REGSPACING 1 1020#define DEFAULT_REGSPACING 1
@@ -2276,7 +2276,7 @@ static int try_smi_init(struct smi_info *new_smi)
2276 new_smi->slave_addr, new_smi->irq); 2276 new_smi->slave_addr, new_smi->irq);
2277 } 2277 }
2278 2278
2279 down(&smi_infos_lock); 2279 mutex_lock(&smi_infos_lock);
2280 if (!is_new_interface(new_smi)) { 2280 if (!is_new_interface(new_smi)) {
2281 printk(KERN_WARNING "ipmi_si: duplicate interface\n"); 2281 printk(KERN_WARNING "ipmi_si: duplicate interface\n");
2282 rv = -EBUSY; 2282 rv = -EBUSY;
@@ -2432,7 +2432,7 @@ static int try_smi_init(struct smi_info *new_smi)
2432 2432
2433 list_add_tail(&new_smi->link, &smi_infos); 2433 list_add_tail(&new_smi->link, &smi_infos);
2434 2434
2435 up(&smi_infos_lock); 2435 mutex_unlock(&smi_infos_lock);
2436 2436
2437 printk(" IPMI %s interface initialized\n",si_to_str[new_smi->si_type]); 2437 printk(" IPMI %s interface initialized\n",si_to_str[new_smi->si_type]);
2438 2438
@@ -2469,7 +2469,7 @@ static int try_smi_init(struct smi_info *new_smi)
2469 2469
2470 kfree(new_smi); 2470 kfree(new_smi);
2471 2471
2472 up(&smi_infos_lock); 2472 mutex_unlock(&smi_infos_lock);
2473 2473
2474 return rv; 2474 return rv;
2475} 2475}
@@ -2527,26 +2527,26 @@ static __devinit int init_ipmi_si(void)
2527#endif 2527#endif
2528 2528
2529 if (si_trydefaults) { 2529 if (si_trydefaults) {
2530 down(&smi_infos_lock); 2530 mutex_lock(&smi_infos_lock);
2531 if (list_empty(&smi_infos)) { 2531 if (list_empty(&smi_infos)) {
2532 /* No BMC was found, try defaults. */ 2532 /* No BMC was found, try defaults. */
2533 up(&smi_infos_lock); 2533 mutex_unlock(&smi_infos_lock);
2534 default_find_bmc(); 2534 default_find_bmc();
2535 } else { 2535 } else {
2536 up(&smi_infos_lock); 2536 mutex_unlock(&smi_infos_lock);
2537 } 2537 }
2538 } 2538 }
2539 2539
2540 down(&smi_infos_lock); 2540 mutex_lock(&smi_infos_lock);
2541 if (list_empty(&smi_infos)) { 2541 if (list_empty(&smi_infos)) {
2542 up(&smi_infos_lock); 2542 mutex_unlock(&smi_infos_lock);
2543#ifdef CONFIG_PCI 2543#ifdef CONFIG_PCI
2544 pci_unregister_driver(&ipmi_pci_driver); 2544 pci_unregister_driver(&ipmi_pci_driver);
2545#endif 2545#endif
2546 printk("ipmi_si: Unable to find any System Interface(s)\n"); 2546 printk("ipmi_si: Unable to find any System Interface(s)\n");
2547 return -ENODEV; 2547 return -ENODEV;
2548 } else { 2548 } else {
2549 up(&smi_infos_lock); 2549 mutex_unlock(&smi_infos_lock);
2550 return 0; 2550 return 0;
2551 } 2551 }
2552} 2552}
@@ -2622,10 +2622,10 @@ static __exit void cleanup_ipmi_si(void)
2622 pci_unregister_driver(&ipmi_pci_driver); 2622 pci_unregister_driver(&ipmi_pci_driver);
2623#endif 2623#endif
2624 2624
2625 down(&smi_infos_lock); 2625 mutex_lock(&smi_infos_lock);
2626 list_for_each_entry_safe(e, tmp_e, &smi_infos, link) 2626 list_for_each_entry_safe(e, tmp_e, &smi_infos, link)
2627 cleanup_one_si(e); 2627 cleanup_one_si(e);
2628 up(&smi_infos_lock); 2628 mutex_unlock(&smi_infos_lock);
2629 2629
2630 driver_unregister(&ipmi_driver); 2630 driver_unregister(&ipmi_driver);
2631} 2631}