summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-06-19 14:25:03 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-06-19 14:25:03 +1000
commit31fa786c29afd5b8d8b4404b18dab165e4eb2e96 (patch)
tree6364783076f17c618a0f195be2a6ec89772a8f58 /drivers/spi
parent356b2f807b17d207c9325b820bba2dc552ce70a6 (diff)
parentc2db66b0e9e9b4dd96124f4b673df1e37563a35b (diff)
Merge commit 'bkl-removal/bkl-removal'
Conflicts: kernel/power/user.c
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spidev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 55b58ea40273..8718729d0f11 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -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>
@@ -466,6 +467,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) {
@@ -491,6 +493,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;
}