From: Jonathan Corbet Date: Fri, 16 May 2008 19:46:14 +0000 (-0600) Subject: spidev: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~107 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=609f9e92b570f390a457a81effe0af6b758dc582;p=linux-2.6 spidev: BKL pushdown Add the BKL to spidev_open(), even though the existing locking looks adequate. Signed-off-by: Jonathan Corbet --- diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index b3518ca9f0..ab2b769c83 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -393,6 +394,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) { @@ -418,6 +420,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; }