summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/Kconfig
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-05-10 14:07:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-13 17:38:46 -0400
commit4efc4bbdc1602d887d784be629a7a4efbf6b6e19 (patch)
tree0ede50007734043fd366d04700cda4392d0fee22 /drivers/staging/comedi/Kconfig
parentb3fab427739c76871c96834e72c369dd0e502d4b (diff)
downloadlinux-3.10-4efc4bbdc1602d887d784be629a7a4efbf6b6e19.tar.gz
linux-3.10-4efc4bbdc1602d887d784be629a7a4efbf6b6e19.tar.bz2
linux-3.10-4efc4bbdc1602d887d784be629a7a4efbf6b6e19.zip
staging: comedi: work without HAS_DMA
The core "comedi" module and the "mite" helper module for NI PCI devices both have calls to `dma_alloc_coherent()` and `dma_free_coherent()`. Those functions are only available if `CONFIG_HAS_DMA` is defined. Apart from the "mite" module, the functions are only called for comedi drivers that set `s->async_dma_dir` (where `s` is a pointer to a `struct comedi_subdevice`) to anything other than `DMA_NONE`. Change local helper functions `__comedi_buf_alloc()` and `__comedi_buf_free()` to only call `dma_alloc_coherent()` and `dma_free_coherent()` if `CONFIG_HAS_DMA` is defined. Change the "Kconfig" to make the following configuration options depend on `HAS_DMA`: `COMEDI_MITE` - builds the "mite" module. `COMEDI_NI_6527` - selects `COMEDI_MITE`. `COMEDI_NI_65XX` - selects `COMEDI_MITE`. `COMEDI_NI_670X` - selects `COMEDI_MITE`. `COMEDI_NI_LABPC_PCI` - selects `COMEDI_MITE`. `COMEDI_NI_PCIDIO` - selects `COMEDI_MITE`. `COMEDI_NI_TIOCMD` - selects `COMEDI_MITE`. `COMEDI_NI_660X` - selects `COMEDI_NI_TIOCMD`, sets `s->async_dma_dir`. `COMEDI_NI_PCIMIO` - selects `COMEDI_NI_TIOCMD`, sets `s->async_dma_dir`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/Kconfig')
-rw-r--r--drivers/staging/comedi/Kconfig9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 7871579bb83..87e852a0ef4 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -981,6 +981,7 @@ config COMEDI_ME_DAQ
config COMEDI_NI_6527
tristate "NI 6527 support"
+ depends on HAS_DMA
select COMEDI_MITE
---help---
Enable support for the National Instruments 6527 PCI card
@@ -990,6 +991,7 @@ config COMEDI_NI_6527
config COMEDI_NI_65XX
tristate "NI 65xx static dio PCI card support"
+ depends on HAS_DMA
select COMEDI_MITE
---help---
Enable support for National Instruments 65xx static dio boards.
@@ -1003,6 +1005,7 @@ config COMEDI_NI_65XX
config COMEDI_NI_660X
tristate "NI 660x counter/timer PCI card support"
+ depends on HAS_DMA
select COMEDI_NI_TIOCMD
---help---
Enable support for National Instruments PCI-6601 (ni_660x), PCI-6602,
@@ -1013,6 +1016,7 @@ config COMEDI_NI_660X
config COMEDI_NI_670X
tristate "NI 670x PCI card support"
+ depends on HAS_DMA
select COMEDI_MITE
---help---
Enable support for National Instruments PCI-6703 and PCI-6704
@@ -1022,6 +1026,7 @@ config COMEDI_NI_670X
config COMEDI_NI_LABPC_PCI
tristate "NI Lab-PC PCI-1200 support"
+ depends on HAS_DMA
select COMEDI_NI_LABPC
select COMEDI_MITE
---help---
@@ -1032,6 +1037,7 @@ config COMEDI_NI_LABPC_PCI
config COMEDI_NI_PCIDIO
tristate "NI PCI-DIO32HS, PCI-6533, PCI-6534 support"
+ depends on HAS_DMA
select COMEDI_MITE
select COMEDI_8255
---help---
@@ -1043,6 +1049,7 @@ config COMEDI_NI_PCIDIO
config COMEDI_NI_PCIMIO
tristate "NI PCI-MIO-E series and M series support"
+ depends on HAS_DMA
select COMEDI_NI_TIOCMD
select COMEDI_8255
select COMEDI_FC
@@ -1095,10 +1102,12 @@ config COMEDI_SSV_DNP
called ssv_dnp.
config COMEDI_MITE
+ depends on HAS_DMA
tristate
config COMEDI_NI_TIOCMD
tristate
+ depends on HAS_DMA
select COMEDI_NI_TIO
select COMEDI_MITE