2014-10-02 14:35:36

by Chen Gang

[permalink] [raw]
Subject: [PATCH] drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM

COMEDI_II_PCI20KC needs HAS_IOMEM, so depend on it. The related error (
with allmodconfig under um):

CC [M] drivers/staging/comedi/drivers/ii_pci20kc.o
drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_attach’:
drivers/staging/comedi/drivers/ii_pci20kc.c:442:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
dev->mmio = ioremap(membase, II20K_SIZE);
^
drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment makes pointer from integer without a cast [enabled by default]
dev->mmio = ioremap(membase, II20K_SIZE);
^
drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_detach’:
drivers/staging/comedi/drivers/ii_pci20kc.c:512:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(dev->mmio);
^

Signed-off-by: Chen Gang <[email protected]>
---
drivers/staging/comedi/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index a8bc2b5..b709736 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -426,6 +426,7 @@ config COMEDI_AIO_IIRO_16

config COMEDI_II_PCI20KC
tristate "Intelligent Instruments PCI-20001C carrier support"
+ depends on HAS_IOMEM
---help---
Enable support for Intelligent Instruments PCI-20001C carrier
PCI-20001, PCI-20006 and PCI-20341
--
1.9.3


2014-10-02 17:01:57

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH] drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM

On Thursday, October 02, 2014 7:41 AM, Chen Gang wrote:
> COMEDI_II_PCI20KC needs HAS_IOMEM, so depend on it. The related error (
> with allmodconfig under um):
>
> CC [M] drivers/staging/comedi/drivers/ii_pci20kc.o
> drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_attach’:
> drivers/staging/comedi/drivers/ii_pci20kc.c:442:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
> dev->mmio = ioremap(membase, II20K_SIZE);
> ^
> drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment makes pointer from integer without a cast [enabled by default]
> dev->mmio = ioremap(membase, II20K_SIZE);
> ^
> drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_detach’:
> drivers/staging/comedi/drivers/ii_pci20kc.c:512:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
> iounmap(dev->mmio);
> ^
>
> Signed-off-by: Chen Gang <[email protected]>
> ---
> drivers/staging/comedi/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
> index a8bc2b5..b709736 100644
> --- a/drivers/staging/comedi/Kconfig
> +++ b/drivers/staging/comedi/Kconfig
> @@ -426,6 +426,7 @@ config COMEDI_AIO_IIRO_16
>
> config COMEDI_II_PCI20KC
> tristate "Intelligent Instruments PCI-20001C carrier support"
> + depends on HAS_IOMEM
> ---help---
> Enable support for Intelligent Instruments PCI-20001C carrier
> PCI-20001, PCI-20006 and PCI-20341

This seems appropriate.

Reviewed-by: H Hartley Sweeten <[email protected]>

????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2014-10-02 17:26:15

by Rostislav Lisovy

[permalink] [raw]
Subject: Re: [PATCH] drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM

On Thu, 2014-10-02 at 17:01 +0000, Hartley Sweeten wrote:
> On Thursday, October 02, 2014 7:41 AM, Chen Gang wrote:
> > COMEDI_II_PCI20KC needs HAS_IOMEM, so depend on it. The related error (
> > with allmodconfig under um):
> >
> > CC [M] drivers/staging/comedi/drivers/ii_pci20kc.o
> > drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_attach’:
> > drivers/staging/comedi/drivers/ii_pci20kc.c:442:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
> > dev->mmio = ioremap(membase, II20K_SIZE);
> > ^
> > drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment makes pointer from integer without a cast [enabled by default]
> > dev->mmio = ioremap(membase, II20K_SIZE);
> > ^
> > drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_detach’:
> > drivers/staging/comedi/drivers/ii_pci20kc.c:512:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
> > iounmap(dev->mmio);
> > ^
> >
> > Signed-off-by: Chen Gang <[email protected]>
> > ---
> > drivers/staging/comedi/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
> > index a8bc2b5..b709736 100644
> > --- a/drivers/staging/comedi/Kconfig
> > +++ b/drivers/staging/comedi/Kconfig
> > @@ -426,6 +426,7 @@ config COMEDI_AIO_IIRO_16
> >
> > config COMEDI_II_PCI20KC
> > tristate "Intelligent Instruments PCI-20001C carrier support"
> > + depends on HAS_IOMEM
> > ---help---
> > Enable support for Intelligent Instruments PCI-20001C carrier
> > PCI-20001, PCI-20006 and PCI-20341
>
> This seems appropriate.
>
> Reviewed-by: H Hartley Sweeten <[email protected]>
>

Since "egrep -irn "ioremap" drivers/staging/comedi/drivers | wc -l"
shows "39" does it mean that this should be added to all the other
drivers as well?

Rostislav Lisovy

2014-10-02 17:44:13

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH] drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM

On Thursday, October 02, 2014 10:26 AM, Rostislav Lisovy wrote:
>
> Since "egrep -irn "ioremap" drivers/staging/comedi/drivers | wc -l"
> shows "39" does it mean that this should be added to all the other
> drivers as well?


The others are actually pci_ioremap_bar() and those drivers depend on PCI.
I don't _think_ these drivers require the depends on HAS_IOMEM.

The ii_pci20kc driver is goofy in that it's actually an ISA board that uses
memory mapped I/O.

Regards,
Hartley

????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2014-10-03 12:47:16

by Ian Abbott

[permalink] [raw]
Subject: Re: [PATCH] drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM

On 02/10/2014 15:41, Chen Gang wrote:
> COMEDI_II_PCI20KC needs HAS_IOMEM, so depend on it. The related error (
> with allmodconfig under um):
>
> CC [M] drivers/staging/comedi/drivers/ii_pci20kc.o
> drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_attach’:
> drivers/staging/comedi/drivers/ii_pci20kc.c:442:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
> dev->mmio = ioremap(membase, II20K_SIZE);
> ^
> drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment makes pointer from integer without a cast [enabled by default]
> dev->mmio = ioremap(membase, II20K_SIZE);
> ^
> drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_detach’:
> drivers/staging/comedi/drivers/ii_pci20kc.c:512:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
> iounmap(dev->mmio);
> ^
>
> Signed-off-by: Chen Gang <[email protected]>

Reviewed-by: Ian Abbott <[email protected]>