summaryrefslogtreecommitdiffstats
path: root/drivers/bus/pci/rte_bus_pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bus/pci/rte_bus_pci.h')
-rw-r--r--drivers/bus/pci/rte_bus_pci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h
index d4a29964..c6af61d7 100644
--- a/drivers/bus/pci/rte_bus_pci.h
+++ b/drivers/bus/pci/rte_bus_pci.h
@@ -103,6 +103,9 @@ struct rte_pci_device {
*/
#define RTE_DEV_TO_PCI(ptr) container_of(ptr, struct rte_pci_device, device)
+#define RTE_DEV_TO_PCI_CONST(ptr) \
+ container_of(ptr, const struct rte_pci_device, device)
+
#define RTE_ETH_DEV_TO_PCI(eth_dev) RTE_DEV_TO_PCI((eth_dev)->device)
/** Any PCI device identifier (vendor, device, ...) */