summaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 19:15:54 +0200
committerJonathan Corbet <corbet@lwn.net>2008-06-20 14:05:57 -0600
commit78abb6ac919cee123e632d833a42d0312ccb2b0d (patch)
treeb968613b7f69e0f849989fe40a5ba541a537842d /drivers/sbus
parent1d17bf0c08569e7aefd27df0179065fb955588c4 (diff)
downloadlinux-78abb6ac919cee123e632d833a42d0312ccb2b0d.tar.bz2
flash: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/flash.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 44e039865aa9..7d95e151513a 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -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;
}