if (port->state == EHEA_PORT_UP)
return 0;
- down(&ehea_fw_handles.lock);
+ mutex_lock(&ehea_fw_handles.lock);
ret = ehea_port_res_setup(port, port->num_def_qps,
port->num_add_tx_qps);
up(&ehea_bcmc_regs.lock);
ehea_update_firmware_handles();
- up(&ehea_fw_handles.lock);
+ mutex_unlock(&ehea_fw_handles.lock);
return ret;
}
ehea_free_interrupts(dev);
- down(&ehea_fw_handles.lock);
+ mutex_lock(&ehea_fw_handles.lock);
port->state = EHEA_PORT_DOWN;
dev->name, ret);
ehea_update_firmware_handles();
- up(&ehea_fw_handles.lock);
+ mutex_unlock(&ehea_fw_handles.lock);
return ret;
}
ehea_error("Invalid ibmebus device probed");
return -EINVAL;
}
- down(&ehea_fw_handles.lock);
+ mutex_lock(&ehea_fw_handles.lock);
adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
if (!adapter) {
out:
ehea_update_firmware_handles();
- up(&ehea_fw_handles.lock);
+ mutex_unlock(&ehea_fw_handles.lock);
return ret;
}
flush_scheduled_work();
- down(&ehea_fw_handles.lock);
+ mutex_lock(&ehea_fw_handles.lock);
ibmebus_free_irq(adapter->neq->attr.ist1, adapter);
tasklet_kill(&adapter->neq_tasklet);
kfree(adapter);
ehea_update_firmware_handles();
- up(&ehea_fw_handles.lock);
+ mutex_unlock(&ehea_fw_handles.lock);
return 0;
}
memset(&ehea_fw_handles, 0, sizeof(ehea_fw_handles));
memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs));
- sema_init(&ehea_fw_handles.lock, 1);
+ mutex_init(&ehea_fw_handles.lock);
sema_init(&ehea_bcmc_regs.lock, 1);
ret = check_module_parm();