aboutsummaryrefslogtreecommitdiffstats
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 68a998bd1069..86048e697eb5 100644
--- a/arch/cris/arch-v10/drivers/gpio.c
+++ b/arch/cris/arch-v10/drivers/gpio.c
@@ -16,6 +16,7 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/fs.h> 18#include <linux/fs.h>
19#include <linux/smp_lock.h>
19#include <linux/string.h> 20#include <linux/string.h>
20#include <linux/poll.h> 21#include <linux/poll.h>
21#include <linux/init.h> 22#include <linux/init.h>
@@ -323,6 +324,7 @@ gpio_open(struct inode *inode, struct file *filp)
323 if (!priv) 324 if (!priv)
324 return -ENOMEM; 325 return -ENOMEM;
325 326
327 lock_kernel();
326 priv->minor = p; 328 priv->minor = p;
327 329
328 /* initialize the io/alarm struct */ 330 /* initialize the io/alarm struct */
@@ -357,6 +359,7 @@ gpio_open(struct inode *inode, struct file *filp)
357 alarmlist = priv; 359 alarmlist = priv;
358 spin_unlock_irqrestore(&gpio_lock, flags); 360 spin_unlock_irqrestore(&gpio_lock, flags);
359 361
362 unlock_kernel();
360 return 0; 363 return 0;
361} 364}
362 365