[PATCH] staging: comedi: ii_pci20kc: add CONFIG_HAS_IOMEM dependence

David Cohen david.a.cohen at linux.intel.com
Wed Oct 15 21:25:39 UTC 2014

ii_pci20kc uses io memory which makes it not compilable on architectures
without HAS_IOMEM such as UML:

  CC      drivers/net/wireless/ti/wl1251/main.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’
  dev->mmio = ioremap(membase, II20K_SIZE);
drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment
makes pointer from integer without a cast
  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’

Signed-off-by: David Cohen <david.a.cohen at linux.intel.com>
 drivers/staging/comedi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index a8bc2b567789..56be2112c731 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -425,6 +425,7 @@ config COMEDI_AIO_IIRO_16
 	  called aio_iiro_16.
+	depends on HAS_IOMEM
 	tristate "Intelligent Instruments PCI-20001C carrier support"
 	  Enable support for Intelligent Instruments PCI-20001C carrier

More information about the devel mailing list