diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2007-12-25 13:00:45 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-01-07 10:32:03 -0500 |
commit | 9cfacb790f581000a7ec8455785d131aca923ded (patch) | |
tree | d157df01abc4671933787e3d5a14374699665b74 /arch/mips/au1000 | |
parent | c4eee283e004751143fb81dbf4f8cfe7b8dcc970 (diff) |
[MIPS] Alchemy: Fix use of __init code bug exposed by modpost warning
WARNING: vmlinux.o(.text+0x1ca608): Section mismatch: reference to
.init.text: add_wired_entry (between 'config_access' and 'config_read')
by refactoring the code calling add_wired_entry() from config_access() to
a separate function which is called from aau1x_pci_setup(). While at it:
- make some unnecassarily global variables 'static';
- fix the letter case, whitespace, etc. in the comments...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/au1000')
-rw-r--r-- | arch/mips/au1000/common/pci.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c index 6fa70a36a250..ce771487567d 100644 --- a/arch/mips/au1000/common/pci.c +++ b/arch/mips/au1000/common/pci.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * BRIEF MODULE DESCRIPTION | 2 | * BRIEF MODULE DESCRIPTION |
3 | * Alchemy/AMD Au1x00 pci support. | 3 | * Alchemy/AMD Au1x00 PCI support. |
4 | * | 4 | * |
5 | * Copyright 2001,2002,2003 MontaVista Software Inc. | 5 | * Copyright 2001-2003, 2007 MontaVista Software Inc. |
6 | * Author: MontaVista Software, Inc. | 6 | * Author: MontaVista Software, Inc. |
7 | * ppopov@mvista.com or source@mvista.com | 7 | * ppopov@mvista.com or source@mvista.com |
8 | * | 8 | * |
@@ -66,6 +66,8 @@ static unsigned long virt_io_addr; | |||
66 | 66 | ||
67 | static int __init au1x_pci_setup(void) | 67 | static int __init au1x_pci_setup(void) |
68 | { | 68 | { |
69 | extern void au1x_pci_cfg_init(void); | ||
70 | |||
69 | #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) | 71 | #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) |
70 | virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START, | 72 | virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START, |
71 | Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1); | 73 | Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1); |
@@ -94,6 +96,8 @@ static int __init au1x_pci_setup(void) | |||
94 | set_io_port_base(virt_io_addr); | 96 | set_io_port_base(virt_io_addr); |
95 | #endif | 97 | #endif |
96 | 98 | ||
99 | au1x_pci_cfg_init(); | ||
100 | |||
97 | register_pci_controller(&au1x_controller); | 101 | register_pci_controller(&au1x_controller); |
98 | return 0; | 102 | return 0; |
99 | } | 103 | } |