]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: Add defines for bridge window indexing
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 29 Aug 2025 13:11:00 +0000 (16:11 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 16 Sep 2025 16:19:24 +0000 (11:19 -0500)
commite4934832c588f72bcc139d3ca0acc490c63a821c
tree3c1bdf07a751461075656a20b7cfbcce8b967c5b
parent8278c6914306f35f32d73bdf2a918950919a0051
PCI: Add defines for bridge window indexing

include/linux/pci.h provides PCI_BRIDGE_{IO,MEM,PREF_MEM}_WINDOW defines,
however, they're based on the resource array indexing in the pci_dev
struct. The struct pci_bus also has pointers to those same resources but
they start from zeroth index.

Add PCI_BUS_BRIDGE_{IO,MEM,PREF_MEM}_WINDOW defines to get rid of literal
indexing.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250829131113.36754-12-ilpo.jarvinen@linux.intel.com
drivers/pci/pci.h
drivers/pci/probe.c