diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-05-05 13:56:35 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-05-05 13:56:35 +0000 |
commit | 56f2e085371d5fc782385b8ab1b2c2f58560ac56 (patch) | |
tree | 1114042e3ffee2c7b88dadff21b998dab692ca8e /target/linux/ar71xx/patches-3.3/112-MIPS-ath79-get-rid-of-some-ifdefs-in-mach-ubnt-xm.c.patch | |
parent | 8fffc6d6df5b99530fe164f82e2705ef9638517d (diff) | |
download | upstream-56f2e085371d5fc782385b8ab1b2c2f58560ac56.tar.gz upstream-56f2e085371d5fc782385b8ab1b2c2f58560ac56.tar.bz2 upstream-56f2e085371d5fc782385b8ab1b2c2f58560ac56.zip |
ar71xx: update 3.3 patches
SVN-Revision: 31602
Diffstat (limited to 'target/linux/ar71xx/patches-3.3/112-MIPS-ath79-get-rid-of-some-ifdefs-in-mach-ubnt-xm.c.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.3/112-MIPS-ath79-get-rid-of-some-ifdefs-in-mach-ubnt-xm.c.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-3.3/112-MIPS-ath79-get-rid-of-some-ifdefs-in-mach-ubnt-xm.c.patch b/target/linux/ar71xx/patches-3.3/112-MIPS-ath79-get-rid-of-some-ifdefs-in-mach-ubnt-xm.c.patch new file mode 100644 index 0000000000..4ef080541d --- /dev/null +++ b/target/linux/ar71xx/patches-3.3/112-MIPS-ath79-get-rid-of-some-ifdefs-in-mach-ubnt-xm.c.patch @@ -0,0 +1,64 @@ +From b2ab491ed634a4c0b7af5f11940e0ca42b1a87c8 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos <juhosg@openwrt.org> +Date: Wed, 14 Mar 2012 10:36:08 +0100 +Subject: [PATCH 17/47] MIPS: ath79: get rid of some ifdefs in mach-ubnt-xm.c + +Remove a superfluous ifdef around an include. Also +reorganize the board setup code a bit, so another +ifdef can be removed. + +Signed-off-by: Gabor Juhos <juhosg@openwrt.org> +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/3497/ +Signed-off-by: Ralf Baechle <ralf@linux-mips.org> +--- + arch/mips/ath79/mach-ubnt-xm.c | 23 ++++++++++++----------- + 1 files changed, 12 insertions(+), 11 deletions(-) + +--- a/arch/mips/ath79/mach-ubnt-xm.c ++++ b/arch/mips/ath79/mach-ubnt-xm.c +@@ -12,10 +12,7 @@ + + #include <linux/init.h> + #include <linux/pci.h> +- +-#ifdef CONFIG_PCI + #include <linux/ath9k_platform.h> +-#endif /* CONFIG_PCI */ + + #include <asm/mach-ath79/irq.h> + +@@ -91,6 +88,17 @@ static struct ar724x_pci_data ubnt_xm_pc + .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, |