]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/cris/arch-v10/drivers/ds1302.c
Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
[net-next-2.6.git] / arch / cris / arch-v10 / drivers / ds1302.c
index 95aadb4a8cf1d5849d114a6bfe8379fe698084b9..3d655dcc65da89df480c51d25c6b0b7199965053 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/module.h>
 #include <linux/miscdevice.h>
 #include <linux/delay.h>
-#include <linux/smp_lock.h>
+#include <linux/mutex.h>
 #include <linux/bcd.h>
 #include <linux/capability.h>
 
@@ -34,6 +34,7 @@
 
 #define RTC_MAJOR_NR 121 /* local major, change later */
 
+static DEFINE_MUTEX(ds1302_mutex);
 static const char ds1302_name[] = "ds1302";
 
 /* The DS1302 might be connected to different bits on different products. 
@@ -357,9 +358,9 @@ static long rtc_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned lon
 {
        int ret;
 
-       lock_kernel();
+       mutex_lock(&ds1302_mutex);
        ret = rtc_ioctl(file, cmd, arg);
-       unlock_kernel();
+       mutex_unlock(&ds1302_mutex);
 
        return ret;
 }