From: Arnd Bergmann Date: Tue, 20 May 2008 17:16:39 +0000 (+0200) Subject: rtc-rtc-m41t80: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~32 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=41012735352e72b8a3f95521817dcad1b2986636;p=linux-2.6-omap-h63xx.git rtc-rtc-m41t80: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c index a3e0880b38f..0a19c06019b 100644 --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -655,12 +656,16 @@ static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, static int wdt_open(struct inode *inode, struct file *file) { if (MINOR(inode->i_rdev) == WATCHDOG_MINOR) { - if (test_and_set_bit(0, &wdt_is_open)) + lock_kernel(); + if (test_and_set_bit(0, &wdt_is_open)) { + unlock_kernel(); return -EBUSY; + } /* * Activate */ wdt_is_open = 1; + unlock_kernel(); return 0; } return -ENODEV;