Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
[pandora-kernel.git] / drivers / char / ip2 / ip2main.c
index 438272c..fcd02ba 100644 (file)
@@ -98,7 +98,7 @@
 #include <linux/major.h>
 #include <linux/wait.h>
 #include <linux/device.h>
-#include <linux/smp_lock.h>
+#include <linux/mutex.h>
 #include <linux/firmware.h>
 #include <linux/platform_device.h>
 
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 
+static DEFINE_MUTEX(ip2_mutex);
 static const struct file_operations ip2mem_proc_fops;
 static const struct file_operations ip2_proc_fops;
 
@@ -238,6 +239,7 @@ static const struct file_operations ip2_ipl = {
        .write          = ip2_ipl_write,
        .unlocked_ioctl = ip2_ipl_ioctl,
        .open           = ip2_ipl_open,
+       .llseek         = noop_llseek,
 }; 
 
 static unsigned long irq_counter;
@@ -2911,7 +2913,7 @@ ip2_ipl_ioctl (struct file *pFile, UINT cmd, ULONG arg )
        printk (KERN_DEBUG "IP2IPL: ioctl cmd %d, arg %ld\n", cmd, arg );
 #endif
 
-       lock_kernel();
+       mutex_lock(&ip2_mutex);
 
        switch ( iplminor ) {
        case 0:     // IPL device
@@ -2975,7 +2977,7 @@ ip2_ipl_ioctl (struct file *pFile, UINT cmd, ULONG arg )
                rc = -ENODEV;
                break;
        }
-       unlock_kernel();
+       mutex_unlock(&ip2_mutex);
        return rc;
 }
 
@@ -2996,7 +2998,6 @@ ip2_ipl_open( struct inode *pInode, struct file *pFile )
 #ifdef IP2DEBUG_IPL
        printk (KERN_DEBUG "IP2IPL: open\n" );
 #endif
-       cycle_kernel_lock();
        return 0;
 }