s390/pci: split lpf

List pci functions is used to query and iterate over pci functions.
This function currently has 2 users - initial device discovery and
rescan after a machine check. Instead of having a multipurpose
function pass a callback which gets called for each pci function.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Sebastian Ott
2013-08-29 19:37:28 +02:00
committed by Martin Schwidefsky
parent 77e844b964
commit 1d57896638
4 changed files with 72 additions and 54 deletions

View File

@@ -99,11 +99,6 @@ struct zpci_dev *get_zdev_by_fid(u32 fid)
return zdev;
}
bool zpci_fid_present(u32 fid)
{
return (get_zdev_by_fid(fid) != NULL) ? true : false;
}
static struct zpci_dev *get_zdev_by_bus(struct pci_bus *bus)
{
return (bus && bus->sysdata) ? (struct zpci_dev *) bus->sysdata : NULL;
@@ -926,7 +921,7 @@ static int __init pci_base_init(void)
if (rc)
goto out_dma;
rc = clp_find_pci_devices();
rc = clp_scan_pci_devices();
if (rc)
goto out_find;