]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/sbus/char/flash.c
flash: BKL pushdown
[linux-2.6-omap-h63xx.git] / drivers / sbus / char / flash.c
index 44e039865aa99714d4184e033a2d5bce65d94532..7d95e151513a0a5446e07ef6da24d9605334af53 100644 (file)
@@ -127,9 +127,13 @@ flash_read(struct file * file, char __user * buf,
 static int
 flash_open(struct inode *inode, struct file *file)
 {
-       if (test_and_set_bit(0, (void *)&flash.busy) != 0)
+       lock_kernel();
+       if (test_and_set_bit(0, (void *)&flash.busy) != 0) {
+               unlock_kernel();
                return -EBUSY;
+       }
 
+       unlock_kernel();
        return 0;
 }