diff options
author | Binoy Jayan <binoy.jayan@linaro.org> | 2017-06-08 15:37:30 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-12 21:17:05 -0400 |
commit | 74d2fd488d77ab4ff15a7fe0b3b6900f2382b42b (patch) | |
tree | 9bb026d2c0aa5e98ac219b2754219cf864b78a3c /drivers/scsi/esas2r/esas2r_ioctl.c | |
parent | 4fae52b5a30b6f2cfc8ecf22524cedc1ece5b774 (diff) | |
download | linux-stable-74d2fd488d77ab4ff15a7fe0b3b6900f2382b42b.tar.gz linux-stable-74d2fd488d77ab4ff15a7fe0b3b6900f2382b42b.tar.bz2 linux-stable-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.c | 4 |
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; } |