aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-16 15:46:14 -0400
committerJonathan Corbet <corbet@lwn.net>2008-06-20 16:05:50 -0400
commit609f9e92b570f390a457a81effe0af6b758dc582 (patch)
tree882d5c953a3770e4010d912de6588db6ca354d5e
parentd21c95c569c462da20d491b75d0a45bd70ddc1bf (diff)
spidev: BKL pushdown
Add the BKL to spidev_open(), even though the existing locking looks adequate. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-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 b3518ca9f04e..ab2b769c83ca 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -29,6 +29,7 @@
29#include <linux/errno.h> 29#include <linux/errno.h>
30#include <linux/mutex.h> 30#include <linux/mutex.h>
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <linux/smp_lock.h>
32 33
33#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
34#include <linux/spi/spidev.h> 35#include <linux/spi/spidev.h>
@@ -393,6 +394,7 @@ static int spidev_open(struct inode *inode, struct file *filp)
393 struct spidev_data *spidev; 394 struct spidev_data *spidev;
394 int status = -ENXIO; 395 int status = -ENXIO;
395 396
397 lock_kernel();
396 mutex_lock(&device_list_lock); 398 mutex_lock(&device_list_lock);
397 399
398 list_for_each_entry(spidev, &device_list, device_entry) { 400 list_for_each_entry(spidev, &device_list, device_entry) {
@@ -418,6 +420,7 @@ static int spidev_open(struct inode *inode, struct file *filp)
418 pr_debug("spidev: nothing for minor %d\n", iminor(inode)); 420 pr_debug("spidev: nothing for minor %d\n", iminor(inode));
419 421
420 mutex_unlock(&device_list_lock); 422 mutex_unlock(&device_list_lock);
423 unlock_kernel();
421 return status; 424 return status;
422} 425}
423 426