summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_mbox.c
diff options
context:
space:
mode:
authorMatthias Kaehlcke2007-07-09 21:00:11 +0200
committerJames Bottomley2007-07-15 02:10:19 +0200
commit0c2cc4337968f7aab91a91b8d5889982e3a3bd0d (patch)
tree96843d958292098ee5b821658e20583a1d35504b /drivers/scsi/megaraid/megaraid_mbox.c
parent[SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation. (diff)
downloadkernel-qcow2-linux-0c2cc4337968f7aab91a91b8d5889982e3a3bd0d.tar.gz
kernel-qcow2-linux-0c2cc4337968f7aab91a91b8d5889982e3a3bd0d.tar.xz
kernel-qcow2-linux-0c2cc4337968f7aab91a91b8d5889982e3a3bd0d.zip
[SCSI] megaraid_mbox: use mutex instead of semaphore
The Megaraid Mailbox driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Acked-by: "Patro, Sumant" <Sumant.Patro@lsi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mbox.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 7d5a4d651b03..c46685a03a9f 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -3880,7 +3880,7 @@ megaraid_sysfs_alloc_resources(adapter_t *adapter)
megaraid_sysfs_free_resources(adapter);
}
- sema_init(&raid_dev->sysfs_sem, 1);
+ mutex_init(&raid_dev->sysfs_mtx);
init_waitqueue_head(&raid_dev->sysfs_wait_q);
@@ -3981,7 +3981,7 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter)
/*
* Allow only one read at a time to go through the sysfs attributes
*/
- down(&raid_dev->sysfs_sem);
+ mutex_lock(&raid_dev->sysfs_mtx);
uioc = raid_dev->sysfs_uioc;
mbox64 = raid_dev->sysfs_mbox64;
@@ -4057,7 +4057,7 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter)
del_timer_sync(timerp);
- up(&raid_dev->sysfs_sem);
+ mutex_unlock(&raid_dev->sysfs_mtx);
return rval;
}