summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v10/drivers/gpio.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-15 09:10:18 -0600
committerJonathan Corbet <corbet@lwn.net>2008-05-18 15:43:40 -0600
commit0c401df37ef9f45f35390a5574e24cbf3f916acf (patch)
tree653b41d514cee2c55565a5b560a5d8238d55e39b /arch/cris/arch-v10/drivers/gpio.c
parent75bd2ef1457998791cfc89cd59927574488fc22a (diff)
downloadlwn-0c401df37ef9f45f35390a5574e24cbf3f916acf.tar.gz
lwn-0c401df37ef9f45f35390a5574e24cbf3f916acf.zip
cris: cdev lock_kernel() pushdown
Push the cdev lock_kernel() call into cris drivers. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
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 @@
#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;
}