From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:43 +0000 (+0200) Subject: cpwatchdog: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~72 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b05c9e6cd939b6f79be17e9b6a23ca15a219dec2;p=linux-2.6 cpwatchdog: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c index 2357034143..23abfdfb44 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)); }