summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mthca/mthca_provider.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-01-30 16:45:11 -0800
committerRoland Dreier <rolandd@cisco.com>2006-01-30 16:45:11 -0800
commitfd9cfdd11be3b37b5c919b64b43990f14a1587bd (patch)
tree6d36c5927fcf17c98bfc38dccbde90925279c544 /drivers/infiniband/hw/mthca/mthca_provider.c
parente3aa31c517cb6fd0a3d8b23e6a7e71a6aafc2393 (diff)
IB/mthca: Semaphore to mutex conversions
Convert semaphores to mutexes in mthca. Leave firmware command interface poll_sem and event_sem as semaphores. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 484a7e6b7f8c..e88e39aef85a 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -185,7 +185,7 @@ static int mthca_modify_port(struct ib_device *ibdev,
int err;
u8 status;
- if (down_interruptible(&to_mdev(ibdev)->cap_mask_mutex))
+ if (mutex_lock_interruptible(&to_mdev(ibdev)->cap_mask_mutex))
return -ERESTARTSYS;
err = mthca_query_port(ibdev, port, &attr);
@@ -207,7 +207,7 @@ static int mthca_modify_port(struct ib_device *ibdev,
}
out:
- up(&to_mdev(ibdev)->cap_mask_mutex);
+ mutex_unlock(&to_mdev(ibdev)->cap_mask_mutex);
return err;
}
@@ -1185,7 +1185,7 @@ int mthca_register_device(struct mthca_dev *dev)
dev->ib_dev.post_recv = mthca_tavor_post_receive;
}
- init_MUTEX(&dev->cap_mask_mutex);
+ mutex_init(&dev->cap_mask_mutex);
ret = ib_register_device(&dev->ib_dev);
if (ret)