summaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 19:15:43 +0200
committerJonathan Corbet <corbet@lwn.net>2008-06-20 14:05:55 -0600
commitb05c9e6cd939b6f79be17e9b6a23ca15a219dec2 (patch)
tree679f3dc744057f7a2ce5c6de32303486ea97755b /drivers/sbus
parent122bc5eaf81a3870f6cc00d2e5e97f32f92e636b (diff)
downloadop-kernel-dev-b05c9e6cd939b6f79be17e9b6a23ca15a219dec2.zip
op-kernel-dev-b05c9e6cd939b6f79be17e9b6a23ca15a219dec2.tar.gz
cpwatchdog: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/cpwatchdog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c
index 2357034..23abfdf 100644
--- a/drivers/sbus/char/cpwatchdog.c
+++ b/drivers/sbus/char/cpwatchdog.c
@@ -279,6 +279,7 @@ static inline int wd_opt_timeout(void)
static int wd_open(struct inode *inode, struct file *f)
{
+ lock_kernel();
switch(iminor(inode))
{
case WD0_MINOR:
@@ -291,6 +292,7 @@ static int wd_open(struct inode *inode, struct file *f)
f->private_data = &wd_dev.watchdog[WD2_ID];
break;
default:
+ unlock_kernel();
return(-ENODEV);
}
@@ -304,11 +306,13 @@ static int wd_open(struct inode *inode, struct file *f)
(void *)wd_dev.regs)) {
printk("%s: Cannot register IRQ %d\n",
WD_OBPNAME, wd_dev.irq);
+ unlock_kernel();
return(-EBUSY);
}
wd_dev.initialized = 1;
}
+ unlock_kernel();
return(nonseekable_open(inode, f));
}
OpenPOWER on IntegriCloud