]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
bf561-coreb: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:15:37 +0000 (19:15 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 20 Jun 2008 20:05:54 +0000 (14:05 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/blackfin/mach-bf561/coreb.c

index 1b44e9e6dc3b6b44956f817d0a56bc622ea4f67b..852647801a012e40fa2186e6dfc7958e841b143f 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/device.h>
 #include <linux/ioport.h>
 #include <linux/module.h>
+#include <linux/smp_lock.h>
 #include <linux/uaccess.h>
 #include <linux/fs.h>
 #include <asm/dma.h>
@@ -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)
 {
+       lock_kernel();
        spin_lock_irq(&coreb_lock);
 
        if (coreb_status & COREB_IS_OPEN)
@@ -204,10 +206,12 @@ static int coreb_open(struct inode *inode, struct file *file)
        coreb_status |= COREB_IS_OPEN;
 
        spin_unlock_irq(&coreb_lock);
+       unlock_kernel();
        return 0;
 
  out_busy:
        spin_unlock_irq(&coreb_lock);
+       unlock_kernel();
        return -EBUSY;
 }