aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/platform/520x/gpio.c
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2012-04-16 23:25:38 -0400
committerGreg Ungerer <gerg@uclinux.org>2012-05-20 07:21:47 -0400
commitf23c144d4265b9251a4146e057af668bcd7667cb (patch)
treef92ed6eec91ab1839cfd3aea3632885c7ee2e9e5 /arch/m68k/platform/520x/gpio.c
parent943c0cd0adf66ebfd7695715e0178e331fc72f43 (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/520x/gpio.c')
-rw-r--r--arch/m68k/platform/520x/gpio.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/m68k/platform/520x/gpio.c b/arch/m68k/platform/520x/gpio.c
index 96b368578baf..49387c34f0c4 100644
--- a/arch/m68k/platform/520x/gpio.c
+++ b/arch/m68k/platform/520x/gpio.c
@@ -20,7 +20,7 @@
20#include <asm/mcfsim.h> 20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h> 21#include <asm/mcfgpio.h>
22 22
23static struct mcf_gpio_chip mcf_gpio_chips[] = { 23struct mcf_gpio_chip mcf_gpio_chips[] = {
24 MCFGPS(PIRQ, 0, 8, MCFEPORT_EPDDR, MCFEPORT_EPDR, MCFEPORT_EPPDR), 24 MCFGPS(PIRQ, 0, 8, MCFEPORT_EPDDR, MCFEPORT_EPDR, MCFEPORT_EPPDR),
25 MCFGPF(CS, 9, 3), 25 MCFGPF(CS, 9, 3),
26 MCFGPF(FECI2C, 16, 4), 26 MCFGPF(FECI2C, 16, 4),
@@ -31,12 +31,4 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = {
31 MCFGPF(FECL, 56, 8), 31 MCFGPF(FECL, 56, 8),
32}; 32};
33 33
34static int __init mcf_gpio_init(void) 34unsigned int mcf_gpio_chips_size = ARRAY_SIZE(mcf_gpio_chips);
35{
36 unsigned i = 0;
37 while (i < ARRAY_SIZE(mcf_gpio_chips))
38 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
39 return 0;
40}
41
42core_initcall(mcf_gpio_init);