From 72552138f07fb29dd7f4ceb0831f492e71b060d0 Mon Sep 17 00:00:00 2001 From: Gavin Shan Date: Fri, 10 Jun 2016 15:03:39 +1000 Subject: core/pci: Extend pci_walk_dev() for PCI slot Currently, pci_walk_dev() iterates all PCI devices behind the specified PHB. This extends the function to allow iteration on PCI devices behind the specified PCI slot so that it can be used by PCI hotplug logic in the subsequent patches. Signed-off-by: Gavin Shan Reviewed-by: Russell Currey Signed-off-by: Stewart Smith --- hw/npu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/npu.c') diff --git a/hw/npu.c b/hw/npu.c index a8f9f06..f57d34d 100644 --- a/hw/npu.c +++ b/hw/npu.c @@ -541,7 +541,7 @@ static void npu_dev_bind_pci_dev(struct npu_dev *dev) if (!phb) continue; - dev->pd = pci_walk_dev(phb, __npu_dev_bind_pci_dev, dev); + dev->pd = pci_walk_dev(phb, NULL, __npu_dev_bind_pci_dev, dev); if (dev->pd) { dev->phb = phb; /* Found the device, set the bit in config space */ @@ -618,7 +618,7 @@ static int npu_dn_fixup(struct phb *phb, static void npu_phb_final_fixup(struct phb *phb) { - pci_walk_dev(phb, npu_dn_fixup, NULL); + pci_walk_dev(phb, NULL, npu_dn_fixup, NULL); } static void npu_ioda_init(struct npu *p) -- cgit v1.1