2023-05-22 10:52:51

by Niklas Schnelle

[permalink] [raw]
Subject: [PATCH v5 03/44] char: 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: Arnd Bergmann <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Niklas Schnelle <[email protected]>
---
drivers/char/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 801d6c83f896..625af75833fc 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -34,6 +34,7 @@ config TTY_PRINTK_LEVEL
config PRINTER
tristate "Parallel printer support"
depends on PARPORT
+ depends on HAS_IOPORT || PARPORT_NOT_PC
help
If you intend to attach a printer to the parallel port of your Linux
box (as opposed to using a serial printer; if the connector at the
@@ -340,7 +341,7 @@ config NVRAM

config DEVPORT
bool "/dev/port character device"
- depends on ISA || PCI
+ depends on HAS_IOPORT
default y
help
Say Y here if you want to support the /dev/port device. The /dev/port
--
2.39.2



2023-07-04 08:25:01

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH v5 03/44] char: add HAS_IOPORT dependencies

Hi Niklas,

On Mon, May 22, 2023 at 12:51 PM Niklas Schnelle <[email protected]> wrote:
> 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: Arnd Bergmann <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Signed-off-by: Niklas Schnelle <[email protected]>

Thanks for your patch, which is now commit 1fbb0b203574bb16 ("char:
add HAS_IOPORT dependencies") upstream.

> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig

> @@ -340,7 +341,7 @@ config NVRAM
>
> config DEVPORT
> bool "/dev/port character device"
> - depends on ISA || PCI
> + depends on HAS_IOPORT
> default y
> help
> Say Y here if you want to support the /dev/port device. The /dev/port

FTR, this change makes DEVPORT show up on Atari with ATARI_ROM_ISA=y.
I guess it doesn't matter much, though.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds