pci: split the function providing uio device and mappings
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 24 Jan 2014 15:31:26 +0000 (16:31 +0100)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 10:07:28 +0000 (11:07 +0100)
commit61410438da8fd1da3b7e09475afc4f3a3a64aec8
tree3037b5e107d0b042d7a0953ffb3a2218a4dcd18f
parent5fe669202a96a73269c57eef3e77a0e44d6d9b8e
pci: split the function providing uio device and mappings

Add a new function pci_get_uio_dev() that parses /sys/bus/pci/devices
to get the uio device associated with a PCI device. This patch just
moves some code that was in pci_uio_map_resource() in the new function
without any functional change.

Thanks to this change, the next commit will be easier to understand.
Moreover it improves readability: having smaller functions help to
understand what pci_uio_map_resource() does.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/linuxapp/eal/eal_pci.c