Commit 9a8bd2f7 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet

bf561-coreb: BKL pushdown

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 52e7c5e0
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/smp_lock.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <asm/dma.h> #include <asm/dma.h>
...@@ -196,6 +197,7 @@ static loff_t coreb_lseek(struct file *file, loff_t offset, int origin) ...@@ -196,6 +197,7 @@ static loff_t coreb_lseek(struct file *file, loff_t offset, int origin)
static int coreb_open(struct inode *inode, struct file *file) static int coreb_open(struct inode *inode, struct file *file)
{ {
lock_kernel();
spin_lock_irq(&coreb_lock); spin_lock_irq(&coreb_lock);
if (coreb_status & COREB_IS_OPEN) if (coreb_status & COREB_IS_OPEN)
...@@ -204,10 +206,12 @@ static int coreb_open(struct inode *inode, struct file *file) ...@@ -204,10 +206,12 @@ static int coreb_open(struct inode *inode, struct file *file)
coreb_status |= COREB_IS_OPEN; coreb_status |= COREB_IS_OPEN;
spin_unlock_irq(&coreb_lock); spin_unlock_irq(&coreb_lock);
unlock_kernel();
return 0; return 0;
out_busy: out_busy:
spin_unlock_irq(&coreb_lock); spin_unlock_irq(&coreb_lock);
unlock_kernel();
return -EBUSY; return -EBUSY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment