Commit b05c9e6c authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet

cpwatchdog: BKL pushdown

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 122bc5ea
...@@ -279,6 +279,7 @@ static inline int wd_opt_timeout(void) ...@@ -279,6 +279,7 @@ static inline int wd_opt_timeout(void)
static int wd_open(struct inode *inode, struct file *f) static int wd_open(struct inode *inode, struct file *f)
{ {
lock_kernel();
switch(iminor(inode)) switch(iminor(inode))
{ {
case WD0_MINOR: case WD0_MINOR:
...@@ -291,6 +292,7 @@ static int wd_open(struct inode *inode, struct file *f) ...@@ -291,6 +292,7 @@ static int wd_open(struct inode *inode, struct file *f)
f->private_data = &wd_dev.watchdog[WD2_ID]; f->private_data = &wd_dev.watchdog[WD2_ID];
break; break;
default: default:
unlock_kernel();
return(-ENODEV); return(-ENODEV);
} }
...@@ -304,11 +306,13 @@ static int wd_open(struct inode *inode, struct file *f) ...@@ -304,11 +306,13 @@ static int wd_open(struct inode *inode, struct file *f)
(void *)wd_dev.regs)) { (void *)wd_dev.regs)) {
printk("%s: Cannot register IRQ %d\n", printk("%s: Cannot register IRQ %d\n",
WD_OBPNAME, wd_dev.irq); WD_OBPNAME, wd_dev.irq);
unlock_kernel();
return(-EBUSY); return(-EBUSY);
} }
wd_dev.initialized = 1; wd_dev.initialized = 1;
} }
unlock_kernel();
return(nonseekable_open(inode, f)); return(nonseekable_open(inode, f));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment