]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/spi/spidev.c
x86 BIOS interface for RTC on SGI UV
[linux-2.6-omap-h63xx.git] / drivers / spi / spidev.c
index f5b60c70389b771bc752be6178ed38cfed2730f9..ddbe1a5e970e1b017b46e629100af8848c292427 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/errno.h>
 #include <linux/mutex.h>
 #include <linux/slab.h>
+#include <linux/smp_lock.h>
 
 #include <linux/spi/spi.h>
 #include <linux/spi/spidev.h>
@@ -464,6 +465,7 @@ static int spidev_open(struct inode *inode, struct file *filp)
        struct spidev_data      *spidev;
        int                     status = -ENXIO;
 
+       lock_kernel();
        mutex_lock(&device_list_lock);
 
        list_for_each_entry(spidev, &device_list, device_entry) {
@@ -489,6 +491,7 @@ static int spidev_open(struct inode *inode, struct file *filp)
                pr_debug("spidev: nothing for minor %d\n", iminor(inode));
 
        mutex_unlock(&device_list_lock);
+       unlock_kernel();
        return status;
 }