Commit 2d5f5659 authored by Linas Vepstas's avatar Linas Vepstas Committed by Paul Mackerras

[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: default avatarLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent da0bd34e
...@@ -65,14 +65,11 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose) ...@@ -65,14 +65,11 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
spin_unlock(&hose_spinlock); spin_unlock(&hose_spinlock);
} }
__init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev) struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
{ {
struct pci_controller *phb; struct pci_controller *phb;
if (mem_init_done) phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
phb = kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
else
phb = alloc_bootmem(sizeof (struct pci_controller));
if (phb == NULL) if (phb == NULL)
return NULL; return NULL;
pci_setup_pci_controller(phb); pci_setup_pci_controller(phb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment