pci: remove loop over drivers in device detach
authorShreyansh Jain <shreyansh.jain@nxp.com>
Tue, 11 Apr 2017 11:07:30 +0000 (13:07 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 14 Apr 2017 13:23:28 +0000 (15:23 +0200)
commitad3e1dec1187bc2be821c0a6f1f34a87e90f19f8
tree8bfec0e733ca31f3cbb8177a9fe0b4a7b58a26f4
parentf102b9c37d04c89fc2faf6be04c022de65362799
pci: remove loop over drivers in device detach

rte_eal_pci_detach calls pci_detach_all_drivers which loops over all
PCI drivers for detaching the device. This is unnecessary as the device
already has the PCI driver reference which can be used directly.

Removing pci_detach_all_drivers and restructuring rte_eal_pci_detach
and rte_eal_pci_detach_dev to work without looping over driver list.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
lib/librte_eal/common/eal_common_pci.c