]> Pileus Git - ~andy/linux/blobdiff - drivers/macintosh/smu.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
[~andy/linux] / drivers / macintosh / smu.c
index e58c3d33e035e4cba5e5213417e08d9a6be91c2f..290cb325a94c8b48becedab2ffe9e363aa4dd7fa 100644 (file)
@@ -19,7 +19,6 @@
  *    the userland interface
  */
 
-#include <linux/smp_lock.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/device.h>
@@ -97,6 +96,7 @@ struct smu_device {
  * I don't think there will ever be more than one SMU, so
  * for now, just hard code that
  */
+static DEFINE_MUTEX(smu_mutex);
 static struct smu_device       *smu;
 static DEFINE_MUTEX(smu_part_access);
 static int smu_irq_inited;
@@ -1095,12 +1095,12 @@ static int smu_open(struct inode *inode, struct file *file)
        pp->mode = smu_file_commands;
        init_waitqueue_head(&pp->wait);
 
-       lock_kernel();
+       mutex_lock(&smu_mutex);
        spin_lock_irqsave(&smu_clist_lock, flags);
        list_add(&pp->list, &smu_clist);
        spin_unlock_irqrestore(&smu_clist_lock, flags);
        file->private_data = pp;
-       unlock_kernel();
+       mutex_unlock(&smu_mutex);
 
        return 0;
 }