PCI/sysfs: Make I/O resource depend on HAS_IOPORT
authorNiklas Schnelle <schnelle@linux.ibm.com>
Mon, 3 Jul 2023 13:52:55 +0000 (15:52 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 18 Jul 2023 21:56:58 +0000 (16:56 -0500)
commit5da1b58868a620cb58ad9ab31632ce9304c9f4f4
tree811c20bb22b4b28e98c5e6052541fa5bfb68f3ab
parentf768c75d61582b011962f9dcb9ff8eafb8da0383
PCI/sysfs: Make I/O resource depend on HAS_IOPORT

If legacy I/O spaces are not supported simply return an error when
trying to access them via pci_resource_io(). This allows inb() and
friends to become undefined when they are known at compile time to be
non-functional in a later patch.

Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Link: https://lore.kernel.org/r/20230703135255.2202721-3-schnelle@linux.ibm.com
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-sysfs.c