aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/3w-xxxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/3w-xxxx.c')
-rw-r--r--drivers/scsi/3w-xxxx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 283f6d25892b..25f678d0780b 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -203,6 +203,7 @@
203#include <linux/delay.h> 203#include <linux/delay.h>
204#include <linux/pci.h> 204#include <linux/pci.h>
205#include <linux/time.h> 205#include <linux/time.h>
206#include <linux/mutex.h>
206#include <asm/io.h> 207#include <asm/io.h>
207#include <asm/irq.h> 208#include <asm/irq.h>
208#include <asm/uaccess.h> 209#include <asm/uaccess.h>
@@ -888,7 +889,7 @@ static int tw_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
888 dprintk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl()\n"); 889 dprintk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl()\n");
889 890
890 /* Only let one of these through at a time */ 891 /* Only let one of these through at a time */
891 if (down_interruptible(&tw_dev->ioctl_sem)) 892 if (mutex_lock_interruptible(&tw_dev->ioctl_lock))
892 return -EINTR; 893 return -EINTR;
893 894
894 /* First copy down the buffer length */ 895 /* First copy down the buffer length */
@@ -1029,7 +1030,7 @@ out2:
1029 /* Now free ioctl buf memory */ 1030 /* Now free ioctl buf memory */
1030 dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_New_Ioctl) - 1, cpu_addr, dma_handle); 1031 dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_New_Ioctl) - 1, cpu_addr, dma_handle);
1031out: 1032out:
1032 up(&tw_dev->ioctl_sem); 1033 mutex_unlock(&tw_dev->ioctl_lock);
1033 return retval; 1034 return retval;
1034} /* End tw_chrdev_ioctl() */ 1035} /* End tw_chrdev_ioctl() */
1035 1036
@@ -1270,7 +1271,7 @@ static int tw_initialize_device_extension(TW_Device_Extension *tw_dev)
1270 tw_dev->pending_tail = TW_Q_START; 1271 tw_dev->pending_tail = TW_Q_START;
1271 tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; 1272 tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
1272 1273
1273 init_MUTEX(&tw_dev->ioctl_sem); 1274 mutex_init(&tw_dev->ioctl_lock);
1274 init_waitqueue_head(&tw_dev->ioctl_wqueue); 1275 init_waitqueue_head(&tw_dev->ioctl_wqueue);
1275 1276
1276 return 0; 1277 return 0;