Re: [RFC/RFT PATCH 04/18] ARM: PCI: bios32: Convert PCI scan API to pci_scan_root_bus_bridge()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 26, 2017 at 1:17 PM, Lorenzo Pieralisi
<lorenzo.pieralisi@xxxxxxx> wrote:

> @@ -483,10 +483,31 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
>
>                         if (hw->scan)
>                                 sys->bus = hw->scan(nr, sys);
> -                       else
> -                               sys->bus = pci_scan_root_bus_msi(parent,
> -                                       sys->busnr, hw->ops, sys,
> -                                       &sys->resources, hw->msi_ctrl);
> +                       else {
> +                               bridge = pci_alloc_host_bridge(0);
> +                               if (!bridge) {
> +                                       kfree(sys);
> +                                       break;
> +                               }

I think for consistency, the pci_alloc_host_bridge() here should replace
the sys=kzalloc(sizeof(struct pci_sys_data), GFP_KERNEL), and
the pci_sys_data made the bridge->private pointer.

      Arnd



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux