diff options
author | Matthias Kaehlcke <matthias.kaehlcke@gmail.com> | 2007-07-09 15:00:11 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-14 20:10:19 -0400 |
commit | 0c2cc4337968f7aab91a91b8d5889982e3a3bd0d (patch) | |
tree | 96843d958292098ee5b821658e20583a1d35504b /drivers/scsi/megaraid/megaraid_mbox.c | |
parent | 5fa0f5e47a87ceb8a3269b28fa14764b37364f63 (diff) |
[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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 7d5a4d651b0..c46685a03a9 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) | |||
3880 | megaraid_sysfs_free_resources(adapter); | 3880 | megaraid_sysfs_free_resources(adapter); |
3881 | } | 3881 | } |
3882 | 3882 | ||
3883 | sema_init(&raid_dev->sysfs_sem, 1); | 3883 | mutex_init(&raid_dev->sysfs_mtx); |
3884 | 3884 | ||
3885 | init_waitqueue_head(&raid_dev->sysfs_wait_q); | 3885 | init_waitqueue_head(&raid_dev->sysfs_wait_q); |
3886 | 3886 | ||
@@ -3981,7 +3981,7 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter) | |||
3981 | /* | 3981 | /* |
3982 | * Allow only one read at a time to go through the sysfs attributes | 3982 | * Allow only one read at a time to go through the sysfs attributes |
3983 | */ | 3983 | */ |
3984 | down(&raid_dev->sysfs_sem); | 3984 | mutex_lock(&raid_dev->sysfs_mtx); |
3985 | 3985 | ||
3986 | uioc = raid_dev->sysfs_uioc; | 3986 | uioc = raid_dev->sysfs_uioc; |
3987 | mbox64 = raid_dev->sysfs_mbox64; | 3987 | mbox64 = raid_dev->sysfs_mbox64; |
@@ -4057,7 +4057,7 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter) | |||
4057 | 4057 | ||
4058 | del_timer_sync(timerp); | 4058 | del_timer_sync(timerp); |
4059 | 4059 | ||
4060 | up(&raid_dev->sysfs_sem); | 4060 | mutex_unlock(&raid_dev->sysfs_mtx); |
4061 | 4061 | ||
4062 | return rval; | 4062 | return rval; |
4063 | } | 4063 | } |