diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-10-23 14:42:19 +0200 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-10-23 15:18:33 +0200 |
commit | e82c6106b04b85879d802bbbeaed30d9b10a92e2 (patch) | |
tree | 99758574cb3555001fff0cb3aebc0de654e7e9a3 /arch/avr32/mach-at32ap/at32ap700x.c | |
parent | e3f91ca48162c3eb70450314a4d09384fccb92fa (diff) |
avr32: Fix GPIO initcall breakage
Add essential system devices, including GPIO controllers, automatically
at core_initcall time. This ensures that the devices are there when the
PIO driver gets initialized at postcore_initcall, fixing a bug exposed
by commit d6634db8fe1784d0a8e4e156970fec034708446e "avr32: Use
platform_driver_probe for pio platform driver".
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/mach-at32ap/at32ap700x.c')
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 8c435a6f4a6..748ac68c73d 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c @@ -813,7 +813,7 @@ static struct resource pio4_resource[] = { DEFINE_DEV(pio, 4); DEV_CLK(mck, pio4, pba, 14); -void __init at32_add_system_devices(void) +static int __init system_device_init(void) { platform_device_register(&at32_pm0_device); platform_device_register(&at32_intc0_device); @@ -832,7 +832,10 @@ void __init at32_add_system_devices(void) platform_device_register(&pio2_device); platform_device_register(&pio3_device); platform_device_register(&pio4_device); + + return 0; } +core_initcall(system_device_init); /* -------------------------------------------------------------------- * PSIF |