From: Linas Vepstas Date: Tue, 2 Oct 2007 21:40:12 +0000 (+1000) Subject: [POWERPC] Use alloc_maybe_bootmem() in pcibios_alloc_controller X-Git-Tag: v2.6.24-rc1~1450^2~131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d5f5659649924b86d527a2af2552bab741d1d6f;p=profile%2Fivi%2Fkernel-x86-ivi.git [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 Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 083cfbd..2ae3b6f 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) 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; - if (mem_init_done) - phb = kmalloc(sizeof(struct pci_controller), GFP_KERNEL); - else - phb = alloc_bootmem(sizeof (struct pci_controller)); + phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL); if (phb == NULL) return NULL; pci_setup_pci_controller(phb);