diff options
Diffstat (limited to 'arch/mips/kernel/rtlx.c')
-rw-r--r-- | arch/mips/kernel/rtlx.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index a10ebfdc28ae..364f066cb497 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -72,8 +72,9 @@ static void rtlx_dispatch(void) | |||
72 | */ | 72 | */ |
73 | static irqreturn_t rtlx_interrupt(int irq, void *dev_id) | 73 | static irqreturn_t rtlx_interrupt(int irq, void *dev_id) |
74 | { | 74 | { |
75 | unsigned int vpeflags; | ||
76 | unsigned long flags; | ||
75 | int i; | 77 | int i; |
76 | unsigned int flags, vpeflags; | ||
77 | 78 | ||
78 | /* Ought not to be strictly necessary for SMTC builds */ | 79 | /* Ought not to be strictly necessary for SMTC builds */ |
79 | local_irq_save(flags); | 80 | local_irq_save(flags); |
@@ -392,20 +393,12 @@ out: | |||
392 | 393 | ||
393 | static int file_open(struct inode *inode, struct file *filp) | 394 | static int file_open(struct inode *inode, struct file *filp) |
394 | { | 395 | { |
395 | int minor = iminor(inode); | 396 | return rtlx_open(iminor(inode), (filp->f_flags & O_NONBLOCK) ? 0 : 1); |
396 | int err; | ||
397 | |||
398 | lock_kernel(); | ||
399 | err = rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1); | ||
400 | unlock_kernel(); | ||
401 | return err; | ||
402 | } | 397 | } |
403 | 398 | ||
404 | static int file_release(struct inode *inode, struct file *filp) | 399 | static int file_release(struct inode *inode, struct file *filp) |
405 | { | 400 | { |
406 | int minor = iminor(inode); | 401 | return rtlx_release(iminor(inode)); |
407 | |||
408 | return rtlx_release(minor); | ||
409 | } | 402 | } |
410 | 403 | ||
411 | static unsigned int file_poll(struct file *file, poll_table * wait) | 404 | static unsigned int file_poll(struct file *file, poll_table * wait) |