diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-15 11:10:50 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-05-18 17:43:40 -0400 |
commit | 7558da942e51933b5e6aa5e851d4da1df0cd6752 (patch) | |
tree | 4a9083e1a94b59cfec25cf5a53689f0f7893d1b8 /arch/mips/kernel/rtlx.c | |
parent | 0c401df37ef9f45f35390a5574e24cbf3f916acf (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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index b88f1c18ff4d..b55641961232 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/vmalloc.h> | 28 | #include <linux/vmalloc.h> |
29 | #include <linux/elf.h> | 29 | #include <linux/elf.h> |
30 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
31 | #include <linux/smp_lock.h> | ||
31 | #include <linux/syscalls.h> | 32 | #include <linux/syscalls.h> |
32 | #include <linux/moduleloader.h> | 33 | #include <linux/moduleloader.h> |
33 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
@@ -392,8 +393,12 @@ out: | |||
392 | static int file_open(struct inode *inode, struct file *filp) | 393 | static int file_open(struct inode *inode, struct file *filp) |
393 | { | 394 | { |
394 | int minor = iminor(inode); | 395 | int minor = iminor(inode); |
396 | int err; | ||
395 | 397 | ||
396 | return rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1); | 398 | lock_kernel(); |
399 | err = rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1); | ||
400 | unlock_kernel(); | ||
401 | return err; | ||
397 | } | 402 | } |
398 | 403 | ||
399 | static int file_release(struct inode *inode, struct file *filp) | 404 | static int file_release(struct inode *inode, struct file *filp) |