summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esas2r/esas2r_ioctl.c
diff options
context:
space:
mode:
authorBinoy Jayan <binoy.jayan@linaro.org>2017-06-08 12:07:30 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-13 03:17:05 +0200
commit74d2fd488d77ab4ff15a7fe0b3b6900f2382b42b (patch)
tree9bb026d2c0aa5e98ac219b2754219cf864b78a3c /drivers/scsi/esas2r/esas2r_ioctl.c
parentscsi: qla2xxx: Fix compile warning (diff)
downloadlinux-74d2fd488d77ab4ff15a7fe0b3b6900f2382b42b.tar.xz
linux-74d2fd488d77ab4ff15a7fe0b3b6900f2382b42b.zip
scsi: esas2r: Replace semaphore fm_api_semaphore with mutex
The semaphore 'fm_api_semaphore' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/esas2r/esas2r_ioctl.c')
-rw-r--r--drivers/scsi/esas2r/esas2r_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c
index 2d4b7f049a68..c6b041a9f007 100644
--- a/drivers/scsi/esas2r/esas2r_ioctl.c
+++ b/drivers/scsi/esas2r/esas2r_ioctl.c
@@ -110,7 +110,7 @@ static void do_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi)
{
struct esas2r_request *rq;
- if (down_interruptible(&a->fm_api_semaphore)) {
+ if (mutex_lock_interruptible(&a->fm_api_mutex)) {
fi->status = FI_STAT_BUSY;
return;
}
@@ -173,7 +173,7 @@ all_done:
free_req:
esas2r_free_request(a, (struct esas2r_request *)rq);
free_sem:
- up(&a->fm_api_semaphore);
+ mutex_unlock(&a->fm_api_mutex);
return;
}