summaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10/drivers/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v10/drivers/gpio.c')
-rw-r--r--arch/cris/arch-v10/drivers/gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c
index 68a998b..86048e6 100644
--- a/arch/cris/arch-v10/drivers/gpio.c
+++ b/arch/cris/arch-v10/drivers/gpio.c
@@ -16,6 +16,7 @@
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/fs.h>
+#include <linux/smp_lock.h>
#include <linux/string.h>
#include <linux/poll.h>
#include <linux/init.h>
@@ -323,6 +324,7 @@ gpio_open(struct inode *inode, struct file *filp)
if (!priv)
return -ENOMEM;
+ lock_kernel();
priv->minor = p;
/* initialize the io/alarm struct */
@@ -357,6 +359,7 @@ gpio_open(struct inode *inode, struct file *filp)
alarmlist = priv;
spin_unlock_irqrestore(&gpio_lock, flags);
+ unlock_kernel();
return 0;
}
OpenPOWER on IntegriCloud