aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-10-02 17:40:12 -0400
committerPaul Mackerras <paulus@samba.org>2007-10-03 01:31:35 -0400
commit2d5f5659649924b86d527a2af2552bab741d1d6f (patch)
tree7f6643e061f2f83f7eda1fad983fff4f27322d2f /arch/powerpc
parentda0bd34e03b48f366a29e0ecdb24f8a0fe856d40 (diff)
[POWERPC] Use alloc_maybe_bootmem() in pcibios_alloc_controller
Use alloc_maybe_bootmem() which wraps the if (mem_init_done) malloc clause. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci-common.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 083cfbdbe0b2..2ae3b6f778a3 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -65,14 +65,11 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
65 spin_unlock(&hose_spinlock); 65 spin_unlock(&hose_spinlock);
66} 66}
67 67
68__init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev) 68struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
69{ 69{
70 struct pci_controller *phb; 70 struct pci_controller *phb;
71 71
72 if (mem_init_done) 72 phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
73 phb = kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
74 else
75 phb = alloc_bootmem(sizeof (struct pci_controller));
76 if (phb == NULL) 73 if (phb == NULL)
77 return NULL; 74 return NULL;
78 pci_setup_pci_controller(phb); 75 pci_setup_pci_controller(phb);