diff options
author | Greg Ungerer <gerg@uclinux.org> | 2012-04-17 13:25:38 +1000 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2012-05-20 21:21:47 +1000 |
commit | f23c144d4265b9251a4146e057af668bcd7667cb (patch) | |
tree | f92ed6eec91ab1839cfd3aea3632885c7ee2e9e5 /arch/m68k/platform/5206/gpio.c | |
parent | 943c0cd0adf66ebfd7695715e0178e331fc72f43 (diff) |
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/5206/gpio.c')
-rw-r--r-- | arch/m68k/platform/5206/gpio.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/m68k/platform/5206/gpio.c b/arch/m68k/platform/5206/gpio.c index 200a7acf084..a652f8e550c 100644 --- a/arch/m68k/platform/5206/gpio.c +++ b/arch/m68k/platform/5206/gpio.c @@ -20,16 +20,8 @@ #include <asm/mcfsim.h> #include <asm/mcfgpio.h> -static struct mcf_gpio_chip mcf_gpio_chips[] = { +struct mcf_gpio_chip mcf_gpio_chips[] = { MCFGPS(PP, 0, 8, MCFSIM_PADDR, MCFSIM_PADAT, MCFSIM_PADAT), }; -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); |