pci: fsl_pci_init: Dynamically allocate the PCI regions
authorBin Meng <bmeng.cn@gmail.com>
Thu, 25 Feb 2021 09:22:22 +0000 (17:22 +0800)
committerPriyanka Jain <priyanka.jain@nxp.com>
Fri, 5 Mar 2021 04:55:42 +0000 (10:25 +0530)
commit7365a03804ed48a827e91141f3b07f11e20572eb
tree2b93fcd6992f5f3cdbeed289f97352b9d1d89ddc
parent714555374f2ff889cecbde62938a17e9678a0f09
pci: fsl_pci_init: Dynamically allocate the PCI regions

Commit e002474158d1 ("pci: pci-uclass: Dynamically allocate the PCI regions")
changes 'struct pci_controller'.regions from pre-allocated array of
regions to dynamically allocated, which unfortunately broken lots of
boards that still use the non-DM PCI driver.

This patch changes the non-DM fsl_pci_init driver to dynamically
allocate the regions, just like what's done in the pci uclass driver.

Fixes: e002474158d1 ("pci: pci-uclass: Dynamically allocate the PCI regions")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/pci/fsl_pci_init.c