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

index 5f80a9dff5735103b91cc16c40338aafa96f853a..10f06a6bfeb5a6b177ba8b4380b9894532e88744 100644 (file)
@@ -73,6 +73,7 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/spinlock.h>
+#include <linux/smp_lock.h>
 #include <linux/sysctl.h>
 #include <linux/wait.h>
 #include <linux/bcd.h>
@@ -733,6 +734,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
  * needed here. Or anywhere else in this driver. */
 static int rtc_open(struct inode *inode, struct file *file)
 {
+       lock_kernel();
        spin_lock_irq(&rtc_lock);
 
        if (rtc_status & RTC_IS_OPEN)
@@ -742,10 +744,12 @@ static int rtc_open(struct inode *inode, struct file *file)
 
        rtc_irq_data = 0;
        spin_unlock_irq(&rtc_lock);
+       unlock_kernel();
        return 0;
 
 out_busy:
        spin_unlock_irq(&rtc_lock);
+       unlock_kernel();
        return -EBUSY;
 }