Commit 128f20c0 authored by Niklas Schnelle's avatar Niklas Schnelle Committed by Greg Kroah-Hartman
Browse files

misc: add HAS_IOPORT dependencies



In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers using them.

Co-developed-by: default avatarArnd Bergmann <arnd@kernel.org>
Signed-off-by: default avatarArnd Bergmann <arnd@kernel.org>
Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Link: https://lore.kernel.org/r/20230516110038.2413224-18-schnelle@linux.ibm.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f050bb8f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
altera-stapl-objs = altera-lpt.o altera-jtag.o altera-comp.o altera.o
altera-stapl-y = altera-jtag.o altera-comp.o altera.o
altera-stapl-$(CONFIG_HAS_IOPORT) += altera-lpt.o

obj-$(CONFIG_ALTERA_STAPL) += altera-stapl.o
+5 −1
Original line number Diff line number Diff line
@@ -2407,6 +2407,10 @@ int altera_init(struct altera_config *config, const struct firmware *fw)

	astate->config = config;
	if (!astate->config->jtag_io) {
		if (!IS_ENABLED(CONFIG_HAS_IOPORT)) {
			retval = -ENODEV;
			goto free_state;
		}
		dprintk("%s: using byteblaster!\n", __func__);
		astate->config->jtag_io = netup_jtag_io_lpt;
	}
@@ -2481,7 +2485,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw)

	} else if (exec_result)
		printk(KERN_ERR "%s: error %d\n", __func__, exec_result);

free_state:
	kfree(astate);
free_value:
	kfree(value);