[dpdk-dev,v2,25/28] eal/pci: Remove pci_probe/close_all_drivers()
Commit Message
These functions are actually wrappers of pci_invoke_all_drivers().
Just call it directly.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
---
lib/librte_eal/common/eal_common_pci.c | 30 ++++--------------------------
1 file changed, 4 insertions(+), 26 deletions(-)
@@ -130,29 +130,7 @@ pci_invoke_all_drivers(struct rte_pci_device *dev, int type)
return 1;
}
-/*
- * If vendor/device ID match, call the devinit() function of all
- * registered driver for the given device. Return -1 if initialization
- * failed, return 1 if no driver is found for this device.
- */
-static int
-pci_probe_all_drivers(struct rte_pci_device *dev)
-{
- return pci_invoke_all_drivers(dev, INVOKE_PROBE);
-}
-
#if defined(RTE_LIBRTE_EAL_HOTPLUG) && defined(RTE_LIBRTE_EAL_LINUXAPP)
-/*
- * If vendor/device ID match, call the devclose() function of all
- * registered driver for the given device. Return -1 if initialization
- * failed, return 1 if no driver is found for this device.
- */
-static int
-pci_close_all_drivers(struct rte_pci_device *dev)
-{
- return pci_invoke_all_drivers(dev, INVOKE_CLOSE);
-}
-
static int
rte_eal_pci_invoke_one(struct rte_pci_addr *addr, int type)
{
@@ -165,10 +143,10 @@ rte_eal_pci_invoke_one(struct rte_pci_addr *addr, int type)
switch (type) {
case INVOKE_PROBE:
- ret = pci_probe_all_drivers(dev);
+ ret = pci_invoke_all_drivers(dev, INVOKE_PROBE);
break;
case INVOKE_CLOSE:
- ret = pci_close_all_drivers(dev);
+ ret = pci_invoke_all_drivers(dev, INVOKE_CLOSE);
break;
}
if (ret < 0)
@@ -237,10 +215,10 @@ rte_eal_pci_probe(void)
/* probe all or only whitelisted devices */
if (probe_all)
- ret = pci_probe_all_drivers(dev);
+ ret = pci_invoke_all_drivers(dev, INVOKE_PROBE);
else if (devargs != NULL &&
devargs->type == RTE_DEVTYPE_WHITELISTED_PCI)
- ret = pci_probe_all_drivers(dev);
+ ret = pci_invoke_all_drivers(dev, INVOKE_PROBE);
if (ret < 0)
rte_exit(EXIT_FAILURE, "Requested device " PCI_PRI_FMT
" cannot be used\n", dev->addr.domain, dev->addr.bus,