]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/kernel/rtlx.c
mips: cdev lock_kernel() pushdown
[linux-2.6-omap-h63xx.git] / arch / mips / kernel / rtlx.c
index b88f1c18ff4dc2fe7b5877972ec39314e0d5639d..b556419612329a26fdf4493b8d4c1ee43073d4a7 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/vmalloc.h>
 #include <linux/elf.h>
 #include <linux/seq_file.h>
+#include <linux/smp_lock.h>
 #include <linux/syscalls.h>
 #include <linux/moduleloader.h>
 #include <linux/interrupt.h>
@@ -392,8 +393,12 @@ out:
 static int file_open(struct inode *inode, struct file *filp)
 {
        int minor = iminor(inode);
+       int err;
 
-       return rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1);
+       lock_kernel();
+       err = rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1);
+       unlock_kernel();
+       return err;
 }
 
 static int file_release(struct inode *inode, struct file *filp)