diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-15 09:10:18 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-05-18 15:43:40 -0600 |
commit | 0c401df37ef9f45f35390a5574e24cbf3f916acf (patch) | |
tree | 653b41d514cee2c55565a5b560a5d8238d55e39b /arch/cris/arch-v32/drivers/mach-a3 | |
parent | 75bd2ef1457998791cfc89cd59927574488fc22a (diff) |
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.c | 4 |
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; } |