diff options
author | Greg Ungerer <gerg@uclinux.org> | 2012-04-17 05:25:38 +0200 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2012-05-20 13:21:47 +0200 |
commit | f23c144d4265b9251a4146e057af668bcd7667cb (patch) | |
tree | f92ed6eec91ab1839cfd3aea3632885c7ee2e9e5 /arch/m68k/platform/5249/gpio.c | |
parent | m68knommu: switch to GPIO init macros in ColdFire 532x init code (diff) | |
download | linux-f23c144d4265b9251a4146e057af668bcd7667cb.tar.xz linux-f23c144d4265b9251a4146e057af668bcd7667cb.zip |
m68knommu: make duplicated ColdFire GPIO init code common for all
The code that adds each ColdFire platforms GPIO signals is duplicated in
each platforms specific code. Remove it from each platforms code and put
a single version in the existing ColdFire gpio subsystem init code.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
Diffstat (limited to 'arch/m68k/platform/5249/gpio.c')
-rw-r--r-- | arch/m68k/platform/5249/gpio.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/m68k/platform/5249/gpio.c b/arch/m68k/platform/5249/gpio.c index 775d618b9a44..422e45fe771d 100644 --- a/arch/m68k/platform/5249/gpio.c +++ b/arch/m68k/platform/5249/gpio.c @@ -20,17 +20,9 @@ #include <asm/mcfsim.h> #include <asm/mcfgpio.h> -static struct mcf_gpio_chip mcf_gpio_chips[] = { +struct mcf_gpio_chip mcf_gpio_chips[] = { MCFGPS(GPIO0, 0, 32, MCFSIM2_GPIOENABLE, MCFSIM2_GPIOWRITE, MCFSIM2_GPIOREAD), MCFGPS(GPIO1, 32, 32, MCFSIM2_GPIO1ENABLE, MCFSIM2_GPIO1WRITE, MCFSIM2_GPIO1READ), }; -static int __init mcf_gpio_init(void) -{ - unsigned i = 0; - while (i < ARRAY_SIZE(mcf_gpio_chips)) - (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]); - return 0; -} - -core_initcall(mcf_gpio_init); +unsigned int mcf_gpio_chips_size = ARRAY_SIZE(mcf_gpio_chips); |