summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v32/drivers/mach-a3
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-15 19:10:18 +0400
committerJonathan Corbet <corbet@lwn.net>2008-05-19 01:43:40 +0400
commit0c401df37ef9f45f35390a5574e24cbf3f916acf (patch)
tree653b41d514cee2c55565a5b560a5d8238d55e39b /arch/cris/arch-v32/drivers/mach-a3
parent75bd2ef1457998791cfc89cd59927574488fc22a (diff)
downloadlinux-0c401df37ef9f45f35390a5574e24cbf3f916acf.tar.xz
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-v32/drivers/mach-a3')
-rw-r--r--arch/cris/arch-v32/drivers/mach-a3/gpio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/cris/arch-v32/drivers/mach-a3/gpio.c b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
index de107dad9f4f..ef98608e5067 100644
--- a/arch/cris/arch-v32/drivers/mach-a3/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
@@ -23,6 +23,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
+#include <linux/smp_lock.h>
#include <asm/etraxgpio.h>
#include <hwregs/reg_map.h>
@@ -390,6 +391,8 @@ static int gpio_open(struct inode *inode, struct file *filp)
if (!priv)
return -ENOMEM;
+
+ lock_kernel();
memset(priv, 0, sizeof(*priv));
priv->minor = p;
@@ -412,6 +415,7 @@ static int gpio_open(struct inode *inode, struct file *filp)
spin_unlock_irq(&gpio_lock);
}
+ unlock_kernel();
return 0;
}