diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-06 02:42:23 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-11 04:45:46 -0400 |
commit | fcef85c0c122f90f57f2f3ef0caeaf6404d6e8f3 (patch) | |
tree | f674a70c38a71309d27029f2c25d18a15800cf88 /arch/arm/plat-samsung/gpio-config.c | |
parent | 1d3ef014b5fe959a789c2df708713d58c9491c3b (diff) |
ARM: SAMSUNG: Add spinlock locking to GPIO banks
Add locking to each GPIO bank to allow for SMP capable code
to use the gpiolib functions. See the gpio-core.h header file
for more information.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung/gpio-config.c')
-rw-r--r-- | arch/arm/plat-samsung/gpio-config.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/plat-samsung/gpio-config.c b/arch/arm/plat-samsung/gpio-config.c index 3282db360fa8..a76eef533392 100644 --- a/arch/arm/plat-samsung/gpio-config.c +++ b/arch/arm/plat-samsung/gpio-config.c | |||
@@ -33,9 +33,9 @@ int s3c_gpio_cfgpin(unsigned int pin, unsigned int config) | |||
33 | 33 | ||
34 | offset = pin - chip->chip.base; | 34 | offset = pin - chip->chip.base; |
35 | 35 | ||
36 | local_irq_save(flags); | 36 | s3c_gpio_lock(chip, flags); |
37 | ret = s3c_gpio_do_setcfg(chip, offset, config); | 37 | ret = s3c_gpio_do_setcfg(chip, offset, config); |
38 | local_irq_restore(flags); | 38 | s3c_gpio_unlock(chip, flags); |
39 | 39 | ||
40 | return ret; | 40 | return ret; |
41 | } | 41 | } |
@@ -51,9 +51,9 @@ unsigned s3c_gpio_getcfg(unsigned int pin) | |||
51 | if (chip) { | 51 | if (chip) { |
52 | offset = pin - chip->chip.base; | 52 | offset = pin - chip->chip.base; |
53 | 53 | ||
54 | local_irq_save(flags); | 54 | s3c_gpio_lock(chip, flags); |
55 | ret = s3c_gpio_do_getcfg(chip, offset); | 55 | ret = s3c_gpio_do_getcfg(chip, offset); |
56 | local_irq_restore(flags); | 56 | s3c_gpio_unlock(chip, flags); |
57 | } | 57 | } |
58 | 58 | ||
59 | return ret; | 59 | return ret; |
@@ -72,9 +72,9 @@ int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) | |||
72 | 72 | ||
73 | offset = pin - chip->chip.base; | 73 | offset = pin - chip->chip.base; |
74 | 74 | ||
75 | local_irq_save(flags); | 75 | s3c_gpio_lock(chip, flags); |
76 | ret = s3c_gpio_do_setpull(chip, offset, pull); | 76 | ret = s3c_gpio_do_setpull(chip, offset, pull); |
77 | local_irq_restore(flags); | 77 | s3c_gpio_unlock(chip, flags); |
78 | 78 | ||
79 | return ret; | 79 | return ret; |
80 | } | 80 | } |