Commit 0ccb86a
comedi: 8255_pci: Conditionally remove devices that use port I/O
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 8255_pci module supports PCI digital I/O devices from various
manufacturers that consist of one or more 8255 Programmable Peripheral
Interface chips (or equivalent hardware) to provide their digital I/O
ports. Some of the devices use port I/O and some only use memory-mapped
I/O.
Conditionally compile in support for the devices that need port I/O if
and only if the `CONFIG_HAS_IOPORT` macro is defined. Change
`pci_8255_auto_attach()` to return an error if the device actually
requires port I/O (based on the PCI BAR resource flags) but the
`HAS_IOPORT` configuration is not enabled.
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-6-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 90d2567 commit 0ccb86a
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
222 | | - | |
| 226 | + | |
223 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
224 | 231 | | |
225 | 232 | | |
226 | 233 | | |
| |||
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
| 269 | + | |
262 | 270 | | |
263 | 271 | | |
264 | 272 | | |
| |||
269 | 277 | | |
270 | 278 | | |
271 | 279 | | |
| 280 | + | |
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
| |||
0 commit comments