aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 13:15:37 -0400
committerJonathan Corbet <corbet@lwn.net>2008-06-20 16:05:54 -0400
commit9a8bd2f76cb78fd730337f1b3b9cbef101ce2dad (patch)
tree8ee89ca2c10098d371a6718f0bdb10467f1474d4 /arch/blackfin
parent52e7c5e08201e20ddbe93cb1977869c38072bc2f (diff)
bf561-coreb: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-bf561/coreb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index 1b44e9e6dc3b..852647801a01 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -32,6 +32,7 @@
32#include <linux/device.h> 32#include <linux/device.h>
33#include <linux/ioport.h> 33#include <linux/ioport.h>
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/smp_lock.h>
35#include <linux/uaccess.h> 36#include <linux/uaccess.h>
36#include <linux/fs.h> 37#include <linux/fs.h>
37#include <asm/dma.h> 38#include <asm/dma.h>
@@ -196,6 +197,7 @@ static loff_t coreb_lseek(struct file *file, loff_t offset, int origin)
196 197
197static int coreb_open(struct inode *inode, struct file *file) 198static int coreb_open(struct inode *inode, struct file *file)
198{ 199{
200 lock_kernel();
199 spin_lock_irq(&coreb_lock); 201 spin_lock_irq(&coreb_lock);
200 202
201 if (coreb_status & COREB_IS_OPEN) 203 if (coreb_status & COREB_IS_OPEN)
@@ -204,10 +206,12 @@ static int coreb_open(struct inode *inode, struct file *file)
204 coreb_status |= COREB_IS_OPEN; 206 coreb_status |= COREB_IS_OPEN;
205 207
206 spin_unlock_irq(&coreb_lock); 208 spin_unlock_irq(&coreb_lock);
209 unlock_kernel();
207 return 0; 210 return 0;
208 211
209 out_busy: 212 out_busy:
210 spin_unlock_irq(&coreb_lock); 213 spin_unlock_irq(&coreb_lock);
214 unlock_kernel();
211 return -EBUSY; 215 return -EBUSY;
212} 216}
213 217