aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 13:15:43 -0400
committerJonathan Corbet <corbet@lwn.net>2008-06-20 16:05:55 -0400
commitb05c9e6cd939b6f79be17e9b6a23ca15a219dec2 (patch)
tree679f3dc744057f7a2ce5c6de32303486ea97755b /drivers
parent122bc5eaf81a3870f6cc00d2e5e97f32f92e636b (diff)
cpwatchdog: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-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 235703414370..23abfdfb44f1 100644
--- a/drivers/sbus/char/cpwatchdog.c
+++ b/drivers/sbus/char/cpwatchdog.c
@@ -279,6 +279,7 @@ static inline int wd_opt_timeout(void)
279 279
280static int wd_open(struct inode *inode, struct file *f) 280static int wd_open(struct inode *inode, struct file *f)
281{ 281{
282 lock_kernel();
282 switch(iminor(inode)) 283 switch(iminor(inode))
283 { 284 {
284 case WD0_MINOR: 285 case WD0_MINOR:
@@ -291,6 +292,7 @@ static int wd_open(struct inode *inode, struct file *f)
291 f->private_data = &wd_dev.watchdog[WD2_ID]; 292 f->private_data = &wd_dev.watchdog[WD2_ID];
292 break; 293 break;
293 default: 294 default:
295 unlock_kernel();
294 return(-ENODEV); 296 return(-ENODEV);
295 } 297 }
296 298
@@ -304,11 +306,13 @@ static int wd_open(struct inode *inode, struct file *f)
304 (void *)wd_dev.regs)) { 306 (void *)wd_dev.regs)) {
305 printk("%s: Cannot register IRQ %d\n", 307 printk("%s: Cannot register IRQ %d\n",
306 WD_OBPNAME, wd_dev.irq); 308 WD_OBPNAME, wd_dev.irq);
309 unlock_kernel();
307 return(-EBUSY); 310 return(-EBUSY);
308 } 311 }
309 wd_dev.initialized = 1; 312 wd_dev.initialized = 1;
310 } 313 }
311 314
315 unlock_kernel();
312 return(nonseekable_open(inode, f)); 316 return(nonseekable_open(inode, f));
313} 317}
314 318