summaryrefslogtreecommitdiffstats
path: root/drivers/char/vr41xx_giu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/vr41xx_giu.c')
-rw-r--r--drivers/char/vr41xx_giu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c
index e5ed09192be8..ffe9b4e3072e 100644
--- a/drivers/char/vr41xx_giu.c
+++ b/drivers/char/vr41xx_giu.c
@@ -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>
@@ -547,6 +548,7 @@ 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;