aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_main.c
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@mvista.com>2008-03-28 17:41:26 -0400
committerJeff Garzik <jeff@garzik.org>2008-03-28 22:14:30 -0400
commit9f71a568f5f1d6c9fb3ca89b6b973475e6475192 (patch)
treee3e239531663b7773c5f0a11483d443910e41daf /drivers/net/ehea/ehea_main.c
parent06f89edf89f254346c95d0c569cecd606459d83e (diff)
netdev: ehea: ehea_fw_handles semaphore to mutex
Converted the ehea_fw_handles.lock to a mutex. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r--drivers/net/ehea/ehea_main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index a3b3b165445a..4ae65e876487 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2453,7 +2453,7 @@ static int ehea_up(struct net_device *dev)
2453 if (port->state == EHEA_PORT_UP) 2453 if (port->state == EHEA_PORT_UP)
2454 return 0; 2454 return 0;
2455 2455
2456 down(&ehea_fw_handles.lock); 2456 mutex_lock(&ehea_fw_handles.lock);
2457 2457
2458 ret = ehea_port_res_setup(port, port->num_def_qps, 2458 ret = ehea_port_res_setup(port, port->num_def_qps,
2459 port->num_add_tx_qps); 2459 port->num_add_tx_qps);
@@ -2517,7 +2517,7 @@ out:
2517 up(&ehea_bcmc_regs.lock); 2517 up(&ehea_bcmc_regs.lock);
2518 2518
2519 ehea_update_firmware_handles(); 2519 ehea_update_firmware_handles();
2520 up(&ehea_fw_handles.lock); 2520 mutex_unlock(&ehea_fw_handles.lock);
2521 2521
2522 return ret; 2522 return ret;
2523} 2523}
@@ -2573,7 +2573,7 @@ static int ehea_down(struct net_device *dev)
2573 2573
2574 ehea_free_interrupts(dev); 2574 ehea_free_interrupts(dev);
2575 2575
2576 down(&ehea_fw_handles.lock); 2576 mutex_lock(&ehea_fw_handles.lock);
2577 2577
2578 port->state = EHEA_PORT_DOWN; 2578 port->state = EHEA_PORT_DOWN;
2579 2579
@@ -2586,7 +2586,7 @@ static int ehea_down(struct net_device *dev)
2586 dev->name, ret); 2586 dev->name, ret);
2587 2587
2588 ehea_update_firmware_handles(); 2588 ehea_update_firmware_handles();
2589 up(&ehea_fw_handles.lock); 2589 mutex_unlock(&ehea_fw_handles.lock);
2590 2590
2591 return ret; 2591 return ret;
2592} 2592}
@@ -3343,7 +3343,7 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
3343 ehea_error("Invalid ibmebus device probed"); 3343 ehea_error("Invalid ibmebus device probed");
3344 return -EINVAL; 3344 return -EINVAL;
3345 } 3345 }
3346 down(&ehea_fw_handles.lock); 3346 mutex_lock(&ehea_fw_handles.lock);
3347 3347
3348 adapter = kzalloc(sizeof(*adapter), GFP_KERNEL); 3348 adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
3349 if (!adapter) { 3349 if (!adapter) {
@@ -3427,7 +3427,7 @@ out_free_ad:
3427 3427
3428out: 3428out:
3429 ehea_update_firmware_handles(); 3429 ehea_update_firmware_handles();
3430 up(&ehea_fw_handles.lock); 3430 mutex_unlock(&ehea_fw_handles.lock);
3431 return ret; 3431 return ret;
3432} 3432}
3433 3433
@@ -3446,7 +3446,7 @@ static int __devexit ehea_remove(struct of_device *dev)
3446 3446
3447 flush_scheduled_work(); 3447 flush_scheduled_work();
3448 3448
3449 down(&ehea_fw_handles.lock); 3449 mutex_lock(&ehea_fw_handles.lock);
3450 3450
3451 ibmebus_free_irq(adapter->neq->attr.ist1, adapter); 3451 ibmebus_free_irq(adapter->neq->attr.ist1, adapter);
3452 tasklet_kill(&adapter->neq_tasklet); 3452 tasklet_kill(&adapter->neq_tasklet);
@@ -3457,7 +3457,7 @@ static int __devexit ehea_remove(struct of_device *dev)
3457 kfree(adapter); 3457 kfree(adapter);
3458 3458
3459 ehea_update_firmware_handles(); 3459 ehea_update_firmware_handles();
3460 up(&ehea_fw_handles.lock); 3460 mutex_unlock(&ehea_fw_handles.lock);
3461 3461
3462 return 0; 3462 return 0;
3463} 3463}
@@ -3544,7 +3544,7 @@ int __init ehea_module_init(void)
3544 memset(&ehea_fw_handles, 0, sizeof(ehea_fw_handles)); 3544 memset(&ehea_fw_handles, 0, sizeof(ehea_fw_handles));
3545 memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs)); 3545 memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs));
3546 3546
3547 sema_init(&ehea_fw_handles.lock, 1); 3547 mutex_init(&ehea_fw_handles.lock);
3548 sema_init(&ehea_bcmc_regs.lock, 1); 3548 sema_init(&ehea_bcmc_regs.lock, 1);
3549 3549
3550 ret = check_module_parm(); 3550 ret = check_module_parm();