diff mbox

[dpdk-dev,v2,25/28] eal/pci: Remove pci_probe/close_all_drivers()

Message ID 1418096571-27531-26-git-send-email-mukawa@igel.co.jp (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Tetsuya Mukawa Dec. 9, 2014, 3:42 a.m. UTC
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(-)
diff mbox

Patch

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 5ff7b49..5044d8e 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -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,