]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/vr41xx_giu.c
Add a bunch of cycle_kernel_lock() calls
[linux-2.6-omap-h63xx.git] / drivers / char / vr41xx_giu.c
index 412937fdb958da364bba8cbe5686a16527b1d8de..ffe9b4e3072e50b02e57c2fa0ac2f58240c85a45 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/smp_lock.h>
 #include <linux/spinlock.h>
 #include <linux/types.h>
 
@@ -543,12 +544,11 @@ static ssize_t gpio_write(struct file *file, const char __user *data,
        return i;
 }
 
-/* No BKL needed here; only global (giu_nr_pins) is only set
-   at probe time */
 static int gpio_open(struct inode *inode, struct file *file)
 {
        unsigned int pin;
 
+       cycle_kernel_lock();
        pin = iminor(inode);
        if (pin >= giu_nr_pins)
                return -EBADF;