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-fs | |
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-fs')
-rw-r--r-- | arch/cris/arch-v32/drivers/mach-fs/gpio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/cris/arch-v32/drivers/mach-fs/gpio.c b/arch/cris/arch-v32/drivers/mach-fs/gpio.c index 7863fd4efc2..fe1fde89388 100644 --- a/arch/cris/arch-v32/drivers/mach-fs/gpio.c +++ b/arch/cris/arch-v32/drivers/mach-fs/gpio.c @@ -22,6 +22,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> @@ -426,9 +427,10 @@ gpio_open(struct inode *inode, struct file *filp) return -EINVAL; priv = kmalloc(sizeof(struct gpio_private), GFP_KERNEL); - if (!priv) return -ENOMEM; + + lock_kernel(); memset(priv, 0, sizeof(*priv)); priv->minor = p; @@ -449,6 +451,7 @@ gpio_open(struct inode *inode, struct file *filp) alarmlist = priv; spin_unlock_irq(&alarm_lock); + unlock_kernel(); return 0; } |