]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/scsi/3w-sas.c
Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
[mv-sheeva.git] / drivers / scsi / 3w-sas.c
index 7afac93d889fda72404f8b2962f28c02401c6457..6a95d111d207269a920fc57c8ceee220ac5d42d8 100644 (file)
@@ -64,7 +64,6 @@
 #include <linux/pci.h>
 #include <linux/time.h>
 #include <linux/mutex.h>
-#include <linux/smp_lock.h>
 #include <linux/slab.h>
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -77,6 +76,7 @@
 
 /* Globals */
 #define TW_DRIVER_VERSION "3.26.02.000"
+static DEFINE_MUTEX(twl_chrdev_mutex);
 static TW_Device_Extension *twl_device_extension_list[TW_MAX_SLOT];
 static unsigned int twl_device_extension_count;
 static int twl_major = -1;
@@ -764,7 +764,7 @@ static long twl_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long
        int retval = -EFAULT;
        void __user *argp = (void __user *)arg;
 
-       lock_kernel();
+       mutex_lock(&twl_chrdev_mutex);
 
        /* Only let one of these through at a time */
        if (mutex_lock_interruptible(&tw_dev->ioctl_lock)) {
@@ -861,7 +861,7 @@ out3:
 out2:
        mutex_unlock(&tw_dev->ioctl_lock);
 out:
-       unlock_kernel();
+       mutex_unlock(&twl_chrdev_mutex);
        return retval;
 } /* End twl_chrdev_ioctl() */
 
@@ -876,7 +876,6 @@ static int twl_chrdev_open(struct inode *inode, struct file *file)
                goto out;
        }
 
-       cycle_kernel_lock();
        minor_number = iminor(inode);
        if (minor_number >= twl_device_extension_count)
                goto out;