diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2023-09-13 20:07:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-05 14:34:04 +0300 |
commit | 88dd4797746ff93093728a48dd9a88cff95f4ca0 (patch) | |
tree | 3223546562bb35195cd5dc5cb01f5d2cdb0c5881 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | a3f2b80847e2b4dd7180872e69b84d515174c236 (diff) | |
download | linux-88dd4797746ff93093728a48dd9a88cff95f4ca0.tar.xz |
comedi: amplc_dio200_common: Conditionally remove I/O port support
In a future patch, the port I/O functions (`inb()`, `outb()`, and
friends will only be declared in the `HAS_IOPORT` configuration option
is enabled.
The amplc_dio200_common module is used by the amplc_dio200 module (for
ISA cards) and the amplc_dio200_pci module (for PCI and PCI Express
cards). It supports both port I/O and memory-mapped I/O.
Port I/O and memory-mapped I/O is confined to the `dio200___read8()`,
`dio200___read32()`, `dio200___write8()` and `dio200___write32()`
functions. Conditionally compile two versions of those functions. If
the `CONFIG_HAS_IOPORT` macro is defined, call either the port I/O or
memory mapped I/O functions depending on the `mmio` member of the
`struct comedi_device`. If the `CONFIG_HAS_IOPORT` macro is undefined
only call the memory-mapped I/O functions.
Add a run-time check to `amplc_dio200_common_attach()` to return an
error if the device wants to use port I/O when the `CONFIG_HAS_IOPORT`
macro is undefined.
The changes allow the module to be built even if the port I/O functions
have not been declared.
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20230913170712.111719-13-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions