]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sparc64-rtc: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:50 +0000 (19:16 +0200)
committerJonathan Corbet <corbet@lwn.net>
Wed, 2 Jul 2008 21:06:25 +0000 (15:06 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/sparc64/kernel/time.c

index e5d238970c7ec60e7d52a04495ffb7eb725340c5..bedc4c159b1c8e29cee6d346619d66c389d9a5f3 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/sched.h>
+#include <linux/smp_lock.h>
 #include <linux/kernel.h>
 #include <linux/param.h>
 #include <linux/string.h>
@@ -1659,10 +1660,14 @@ static int mini_rtc_ioctl(struct inode *inode, struct file *file,
 
 static int mini_rtc_open(struct inode *inode, struct file *file)
 {
-       if (mini_rtc_status & RTC_IS_OPEN)
+       lock_kernel();
+       if (mini_rtc_status & RTC_IS_OPEN) {
+               unlock_kernel();
                return -EBUSY;
+       }
 
        mini_rtc_status |= RTC_IS_OPEN;
+       unlock_kernel();
 
        return 0;
 }