aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/kernel/rtlx.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-15 09:10:50 -0600
committerJonathan Corbet <corbet@lwn.net>2008-05-18 15:43:40 -0600
commit7558da942e51933b5e6aa5e851d4da1df0cd6752 (patch)
tree4a9083e1a94b59cfec25cf5a53689f0f7893d1b8 /arch/mips/kernel/rtlx.c
parent0c401df37ef9f45f35390a5574e24cbf3f916acf (diff)
mips: cdev lock_kernel() pushdown
Push the cdev lock_kernel() call into MIPS-specific drivers. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'arch/mips/kernel/rtlx.c')
-rw-r--r--arch/mips/kernel/rtlx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index b88f1c18ff4..b5564196123 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -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)