In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. As PC style parport uses these functions we need to
handle this dependency for HAS_IOPORT.
Co-developed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Niklas Schnelle <[email protected]>
---
drivers/parport/Kconfig | 2 +-
include/linux/parport.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig
index e78a9f0302c7..d824f3069302 100644
--- a/drivers/parport/Kconfig
+++ b/drivers/parport/Kconfig
@@ -14,7 +14,6 @@ config ARCH_MIGHT_HAVE_PC_PARPORT
menuconfig PARPORT
tristate "Parallel port support"
- depends on HAS_IOMEM
help
If you want to use devices connected to your machine's parallel port
(the connector at the computer with 25 holes), e.g. printer, ZIP
@@ -43,6 +42,7 @@ if PARPORT
config PARPORT_PC
tristate "PC-style hardware"
depends on ARCH_MIGHT_HAVE_PC_PARPORT
+ depends on HAS_IOPORT
help
You should say Y here if you have a PC-style parallel port. All
IBM PC compatible computers and some Alphas have PC-style
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 1c16ffb8b908..04ca5dc597a1 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -519,7 +519,7 @@ extern int parport_device_proc_register(struct pardevice *device);
extern int parport_device_proc_unregister(struct pardevice *device);
/* If PC hardware is the only type supported, we can optimise a bit. */
-#if !defined(CONFIG_PARPORT_NOT_PC)
+#if !defined(CONFIG_PARPORT_NOT_PC) && defined(CONFIG_PARPORT_PC)
#include <linux/parport_pc.h>
#define parport_write_data(p,x) parport_pc_write_data(p,x)
--
2.32.0
Hi Niklas,
On Mon, Dec 27, 2021 at 5:48 PM Niklas Schnelle <[email protected]> wrote:
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. As PC style parport uses these functions we need to
> handle this dependency for HAS_IOPORT.
>
> 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!
> --- a/drivers/parport/Kconfig
> +++ b/drivers/parport/Kconfig
> @@ -14,7 +14,6 @@ config ARCH_MIGHT_HAVE_PC_PARPORT
>
> menuconfig PARPORT
> tristate "Parallel port support"
> - depends on HAS_IOMEM
Why drop this?
Don't all other parport drivers depend on it?
> help
> If you want to use devices connected to your machine's parallel port
> (the connector at the computer with 25 holes), e.g. printer, ZIP
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
On Tue, 2021-12-28 at 11:14 +0100, Geert Uytterhoeven wrote:
> Hi Niklas,
>
> On Mon, Dec 27, 2021 at 5:48 PM Niklas Schnelle <[email protected]> wrote:
> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > not being declared. As PC style parport uses these functions we need to
> > handle this dependency for HAS_IOPORT.
> >
> > 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!
>
> > --- a/drivers/parport/Kconfig
> > +++ b/drivers/parport/Kconfig
> > @@ -14,7 +14,6 @@ config ARCH_MIGHT_HAVE_PC_PARPORT
> >
> > menuconfig PARPORT
> > tristate "Parallel port support"
> > - depends on HAS_IOMEM
>
> Why drop this?
> Don't all other parport drivers depend on it?
Seeing as the only platforms where HAS_IOMEM can even be unset are s390
and um you're probably right. Let's keep this.
>
> > help
> > If you want to use devices connected to your machine's parallel port
> > (the connector at the computer with 25 holes), e.g. printer, ZIP
>
> 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
On Tue, Dec 28, 2021 at 5:14 AM Geert Uytterhoeven <[email protected]> wrote:
>
> Hi Niklas,
>
> On Mon, Dec 27, 2021 at 5:48 PM Niklas Schnelle <[email protected]> wrote:
> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > not being declared. As PC style parport uses these functions we need to
> > handle this dependency for HAS_IOPORT.
> >
> > 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!
>
> > --- a/drivers/parport/Kconfig
> > +++ b/drivers/parport/Kconfig
> > @@ -14,7 +14,6 @@ config ARCH_MIGHT_HAVE_PC_PARPORT
> >
> > menuconfig PARPORT
> > tristate "Parallel port support"
> > - depends on HAS_IOMEM
>
> Why drop this?
> Don't all other parport drivers depend on it?
The other drivers all have dependencies on specific platforms, so I
probably dropped it in the original draft because the remaining dependencies
are sufficient.
Technically, the partport_pc driver only needs HAS_IOPORT, not HAS_IOMEM,
but in the end this makes very little difference.
Arnd