diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:43:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:43:11 -0400 |
commit | 5704e44d283e907623e3775c1262f206a2c48cf3 (patch) | |
tree | 0a981b24173e90854e7b7d812b35859e1e5f0174 /arch/cris/arch-v32/drivers/mach-a3/gpio.c | |
parent | 91151240ed8e97cc4457dae4094153c2744f1eb8 (diff) | |
parent | 6de5bd128d381ad88ac6d419a5e597048eb468cf (diff) |
Merge branch 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
BKL: introduce CONFIG_BKL.
dabusb: remove the BKL
sunrpc: remove the big kernel lock
init/main.c: remove BKL notations
blktrace: remove the big kernel lock
rtmutex-tester: make it build without BKL
dvb-core: kill the big kernel lock
dvb/bt8xx: kill the big kernel lock
tlclk: remove big kernel lock
fix rawctl compat ioctls breakage on amd64 and itanic
uml: kill big kernel lock
parisc: remove big kernel lock
cris: autoconvert trivial BKL users
alpha: kill big kernel lock
isapnp: BKL removal
s390/block: kill the big kernel lock
hpet: kill BKL, add compat_ioctl
Diffstat (limited to 'arch/cris/arch-v32/drivers/mach-a3/gpio.c')
-rw-r--r-- | arch/cris/arch-v32/drivers/mach-a3/gpio.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/cris/arch-v32/drivers/mach-a3/gpio.c b/arch/cris/arch-v32/drivers/mach-a3/gpio.c index 2dcd27adbad4..50d1885c4794 100644 --- a/arch/cris/arch-v32/drivers/mach-a3/gpio.c +++ b/arch/cris/arch-v32/drivers/mach-a3/gpio.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <linux/smp_lock.h> | 26 | #include <linux/mutex.h> |
27 | 27 | ||
28 | #include <asm/etraxgpio.h> | 28 | #include <asm/etraxgpio.h> |
29 | #include <hwregs/reg_map.h> | 29 | #include <hwregs/reg_map.h> |
@@ -66,6 +66,7 @@ static int dp_cnt; | |||
66 | #define DP(x) | 66 | #define DP(x) |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | static DEFINE_MUTEX(gpio_mutex); | ||
69 | static char gpio_name[] = "etrax gpio"; | 70 | static char gpio_name[] = "etrax gpio"; |
70 | 71 | ||
71 | #ifdef CONFIG_ETRAX_VIRTUAL_GPIO | 72 | #ifdef CONFIG_ETRAX_VIRTUAL_GPIO |
@@ -391,7 +392,7 @@ static int gpio_open(struct inode *inode, struct file *filp) | |||
391 | if (!priv) | 392 | if (!priv) |
392 | return -ENOMEM; | 393 | return -ENOMEM; |
393 | 394 | ||
394 | lock_kernel(); | 395 | mutex_lock(&gpio_mutex); |
395 | memset(priv, 0, sizeof(*priv)); | 396 | memset(priv, 0, sizeof(*priv)); |
396 | 397 | ||
397 | priv->minor = p; | 398 | priv->minor = p; |
@@ -414,7 +415,7 @@ static int gpio_open(struct inode *inode, struct file *filp) | |||
414 | spin_unlock_irq(&gpio_lock); | 415 | spin_unlock_irq(&gpio_lock); |
415 | } | 416 | } |
416 | 417 | ||
417 | unlock_kernel(); | 418 | mutex_unlock(&gpio_mutex); |
418 | return 0; | 419 | return 0; |
419 | } | 420 | } |
420 | 421 | ||
@@ -667,9 +668,9 @@ static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
667 | { | 668 | { |
668 | long ret; | 669 | long ret; |
669 | 670 | ||
670 | lock_kernel(); | 671 | mutex_lock(&gpio_mutex); |
671 | ret = gpio_ioctl_unlocked(file, cmd, arg); | 672 | ret = gpio_ioctl_unlocked(file, cmd, arg); |
672 | unlock_kernel(); | 673 | mutex_unlock(&gpio_mutex); |
673 | 674 | ||
674 | return ret; | 675 | return ret; |
675 | } | 676 | } |