]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: gpib: Make GPIB_NI_PCI_ISA depend on HAS_IOPORT
authorNathan Chancellor <nathan@kernel.org>
Sat, 23 Nov 2024 20:03:25 +0000 (13:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2024 15:56:21 +0000 (16:56 +0100)
After commit 78ecb0375685 ("staging: gpib: make port I/O code
conditional"), building tnt4882.ko on platforms without HAS_IOPORT (such
as hexagon and s390) fails with:

  ERROR: modpost: "inb_wrapper" [drivers/staging/gpib/tnt4882/tnt4882.ko] undefined!
  ERROR: modpost: "inw_wrapper" [drivers/staging/gpib/tnt4882/tnt4882.ko] undefined!
  ERROR: modpost: "nec7210_locking_ioport_write_byte" [drivers/staging/gpib/tnt4882/tnt4882.ko] undefined!
  ERROR: modpost: "nec7210_locking_ioport_read_byte" [drivers/staging/gpib/tnt4882/tnt4882.ko] undefined!
  ERROR: modpost: "outb_wrapper" [drivers/staging/gpib/tnt4882/tnt4882.ko] undefined!
  ERROR: modpost: "outw_wrapper" [drivers/staging/gpib/tnt4882/tnt4882.ko] undefined!

Only allow tnt4882.ko to be built when CONFIG_HAS_IOPORT is set to avoid
this build failure, as this driver unconditionally needs it.

Fixes: 78ecb0375685 ("staging: gpib: make port I/O code conditional")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20241123-gpib-tnt4882-depends-on-has_ioport-v1-1-033c58b64751@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/Kconfig

index 95308d15a55516de9118e7ae90a6103ee8c6c003..9ee4323164654916e7ed49190eaf5bb02ce7f045 100644 (file)
@@ -62,6 +62,7 @@ config GPIB_CEC_PCI
 config GPIB_NI_PCI_ISA
        tristate "NI PCI/ISA compatible boards"
        depends on ISA_BUS || PCI || PCMCIA
+       depends on HAS_IOPORT
        select GPIB_COMMON
        select GPIB_NEC7210
        help