Add a bunch of cycle_kernel_lock() calls
[pandora-kernel.git] / drivers / char / ppdev.c
index ce19875..f6e6aca 100644 (file)
@@ -66,6 +66,7 @@
 #include <linux/poll.h>
 #include <linux/major.h>
 #include <linux/ppdev.h>
+#include <linux/smp_lock.h>
 #include <asm/uaccess.h>
 
 #define PP_VERSION "ppdev: user-space parallel port driver"
@@ -633,12 +634,12 @@ static int pp_ioctl(struct inode *inode, struct file *file,
        return 0;
 }
 
-/* No BKL needed here: only local resources used */
 static int pp_open (struct inode * inode, struct file * file)
 {
        unsigned int minor = iminor(inode);
        struct pp_struct *pp;
 
+       cycle_kernel_lock();
        if (minor >= PARPORT_MAX)
                return -ENXIO;