]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/input/misc/hp_sdc_rtc.c
Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
[mv-sheeva.git] / drivers / input / misc / hp_sdc_rtc.c
index 7e2c12a5b83933e23ce665783d2886b4ee6f211f..0b4f54265f62d31031598aaeadd3240c50af7d1b 100644 (file)
@@ -43,7 +43,7 @@
 #include <linux/proc_fs.h>
 #include <linux/poll.h>
 #include <linux/rtc.h>
-#include <linux/smp_lock.h>
+#include <linux/mutex.h>
 #include <linux/semaphore.h>
 
 MODULE_AUTHOR("Brian S. Julin <bri@calyx.com>");
@@ -52,6 +52,7 @@ MODULE_LICENSE("Dual BSD/GPL");
 
 #define RTC_VERSION "1.10d"
 
+static DEFINE_MUTEX(hp_sdc_rtc_mutex);
 static unsigned long epoch = 2000;
 
 static struct semaphore i8042tregs;
@@ -665,9 +666,9 @@ static long hp_sdc_rtc_unlocked_ioctl(struct file *file,
 {
        int ret;
 
-       lock_kernel();
+       mutex_lock(&hp_sdc_rtc_mutex);
        ret = hp_sdc_rtc_ioctl(file, cmd, arg);
-       unlock_kernel();
+       mutex_unlock(&hp_sdc_rtc_mutex);
 
        return ret;
 }