]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/macintosh/smu.c
mmc: struct device - replace bus_id with dev_name(), dev_set_name()
[linux-2.6-omap-h63xx.git] / drivers / macintosh / smu.c
index 76dbf25cb70ffe2cde80414cb63687ea7d7adf26..96faa799b82a84784d515f4d0aa77d527ca9ee28 100644 (file)
@@ -19,6 +19,7 @@
  *    the userland interface
  */
 
+#include <linux/smp_lock.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/device.h>
@@ -1090,10 +1091,12 @@ static int smu_open(struct inode *inode, struct file *file)
        pp->mode = smu_file_commands;
        init_waitqueue_head(&pp->wait);
 
+       lock_kernel();
        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();
 
        return 0;
 }