diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-15 11:10:18 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-05-18 17:43:40 -0400 |
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 7863fd4efc2b..fe1fde893887 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 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/smp_lock.h> | ||
25 | 26 | ||
26 | #include <asm/etraxgpio.h> | 27 | #include <asm/etraxgpio.h> |
27 | #include <hwregs/reg_map.h> | 28 | #include <hwregs/reg_map.h> |
@@ -426,9 +427,10 @@ gpio_open(struct inode *inode, struct file *filp) | |||
426 | return -EINVAL; | 427 | return -EINVAL; |
427 | 428 | ||
428 | priv = kmalloc(sizeof(struct gpio_private), GFP_KERNEL); | 429 | priv = kmalloc(sizeof(struct gpio_private), GFP_KERNEL); |
429 | |||
430 | if (!priv) | 430 | if (!priv) |
431 | return -ENOMEM; | 431 | return -ENOMEM; |
432 | |||
433 | lock_kernel(); | ||
432 | memset(priv, 0, sizeof(*priv)); | 434 | memset(priv, 0, sizeof(*priv)); |
433 | 435 | ||
434 | priv->minor = p; | 436 | priv->minor = p; |
@@ -449,6 +451,7 @@ gpio_open(struct inode *inode, struct file *filp) | |||
449 | alarmlist = priv; | 451 | alarmlist = priv; |
450 | spin_unlock_irq(&alarm_lock); | 452 | spin_unlock_irq(&alarm_lock); |
451 | 453 | ||
454 | unlock_kernel(); | ||
452 | return 0; | 455 | return 0; |
453 | } | 456 | } |
454 | 457 | ||