]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/sbus/char/rtc.c
Merge branches 'acpica-release-fixes', 'ec-fix', 'dock', 'irq-bounds', 'thermal-fix...
[linux-2.6-omap-h63xx.git] / drivers / sbus / char / rtc.c
index 18d18f1a114ec9cdf8d4443bb236d0cb9b8e0208..b0429917154da55c4f6cfea7abda0366718ac8af 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/smp_lock.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/miscdevice.h>
@@ -213,6 +214,7 @@ static int rtc_open(struct inode *inode, struct file *file)
 {
        int ret;
 
+       lock_kernel();
        spin_lock_irq(&mostek_lock);
        if (rtc_busy) {
                ret = -EBUSY;
@@ -221,6 +223,7 @@ static int rtc_open(struct inode *inode, struct file *file)
                ret = 0;
        }
        spin_unlock_irq(&mostek_lock);
+       unlock_kernel();
 
        return ret;
 }