]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI: Add pci_resource_is_io() and pci_resource_is_mem() helpers
authorKrzysztof Wilczyński <kwilczynski@kernel.org>
Fri, 8 May 2026 04:35:21 +0000 (04:35 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 8 May 2026 22:44:19 +0000 (17:44 -0500)
commit77c5f3def45937f3f90ea4018cfdf9342b78b78a
treec162762a4748e4dd18aee594aa7cfc75cf3f274b
parentd29eac59214327e61ff47a980cceeadb7f25d01a
PCI: Add pci_resource_is_io() and pci_resource_is_mem() helpers

Add helpers to check whether a PCI resource is of I/O port or memory type.
These replace the open-coded pci_resource_flags() with IORESOURCE_IO and
IORESOURCE_MEM pattern used across the tree.

Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/20260508043543.217179-3-kwilczynski@kernel.org
include/linux/pci.h