From 17280b8af0f7c23528e08841ae15171d627da61c Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Wed, 14 Mar 2012 10:36:08 +0100 Subject: [PATCH] --- yaml --- r: 309044 b: refs/heads/master c: 881b6ef0cca3395ac0171472a1ce768fede7535b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/ath79/mach-ubnt-xm.c | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 7e8b72ba23e9..21a4719e0a2c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4c07c7dfa0f3575dc3276c544349fbf181381167 +refs/heads/master: 881b6ef0cca3395ac0171472a1ce768fede7535b diff --git a/trunk/arch/mips/ath79/mach-ubnt-xm.c b/trunk/arch/mips/ath79/mach-ubnt-xm.c index 0d95b67a7d4f..1e6b986cb470 100644 --- a/trunk/arch/mips/ath79/mach-ubnt-xm.c +++ b/trunk/arch/mips/ath79/mach-ubnt-xm.c @@ -12,10 +12,7 @@ #include #include - -#ifdef CONFIG_PCI #include -#endif /* CONFIG_PCI */ #include @@ -91,6 +88,17 @@ static struct ar724x_pci_data ubnt_xm_pci_data[] = { .pdata = &ubnt_xm_eeprom_data, }, }; + +static void __init ubnt_xm_pci_init(void) +{ + memcpy(ubnt_xm_eeprom_data.eeprom_data, UBNT_XM_EEPROM_ADDR, + sizeof(ubnt_xm_eeprom_data.eeprom_data)); + + ar724x_pci_add_data(ubnt_xm_pci_data, ARRAY_SIZE(ubnt_xm_pci_data)); + ath79_register_pci(); +} +#else +static inline void ubnt_xm_pci_init(void) {} #endif /* CONFIG_PCI */ static void __init ubnt_xm_init(void) @@ -105,14 +113,7 @@ static void __init ubnt_xm_init(void) ath79_register_spi(&ubnt_xm_spi_data, ubnt_xm_spi_info, ARRAY_SIZE(ubnt_xm_spi_info)); -#ifdef CONFIG_PCI - memcpy(ubnt_xm_eeprom_data.eeprom_data, UBNT_XM_EEPROM_ADDR, - sizeof(ubnt_xm_eeprom_data.eeprom_data)); - - ar724x_pci_add_data(ubnt_xm_pci_data, ARRAY_SIZE(ubnt_xm_pci_data)); -#endif /* CONFIG_PCI */ - - ath79_register_pci(); + ubnt_xm_pci_init(); } MIPS_MACHINE(ATH79_MACH_UBNT_XM,