linux/drivers/staging
Ian Abbott bd304a736a staging: comedi: ni_mio_common: only do counter commands for ni_pcimio
"ni_mio_common.c" holds common code included by "ni_pcimio.c",
"ni_atmio.c" and "ni_mio_cs.c", including a common initialization
function `ni_E_init()`.  Amongst other things, this initializes some
counter subdevices to support comedi instructions and asynchronous
commands.  However, even though it sets up the handlers to support
asynchronous commands on these subdevices, the handlers will return an
error unless the `PCIDMA` macro is defined (which is defined only in
"ni_pcimio.c").  If the `PCIDMA` macro is not defined, the comedi core
will needlessly allocate buffers to support the asynchronous commands.
Also, `s->async_dma_dir` is set to `DMA_BIDIRECTIONAL`, causing the
physical pages for the buffers to be allocated using
`dma_alloc_coherent()`.

If the comedi core cannot call `dma_alloc_coherent()` because
`CONFIG_HAS_DMA` is not defined, it will fail to allocate the buffers,
which ultimately causes `ni_E_init()` to fail.

Avoid the wastage and prevent the failure by only setting up
asynchronous command support for the counter subdevices if the `PCIDMA`
macro is defined.

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>
2013-05-13 17:38:47 -04:00
..
android Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
asus_oled
bcm
ced1401
comedi staging: comedi: ni_mio_common: only do counter commands for ni_pcimio 2013-05-13 17:38:47 -04:00
cptm1217 staging: cptm1217: Use dev_pm_ops 2013-04-08 10:20:16 -07:00
crystalhd
csr staging: single_open() leaks 2013-05-05 00:15:43 -04:00
cxt1e1 staging: single_open() leaks 2013-05-05 00:15:43 -04:00
dgrp Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
dwc2 staging: dwc2: add platform device bindings 2013-04-23 10:37:55 -07:00
echo
et131x staging: et131x: cancel_work when module gets unloaded 2013-04-11 13:07:05 -07:00
frontier
ft1000 staging: single_open() leaks 2013-05-05 00:15:43 -04:00
fwserial TTY/Serial driver update for 3.10-rc1 2013-04-29 12:16:17 -07:00
gdm72xx Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
goldfish
iio Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
imx-drm ARM: arm-soc platform updates for 3.10, part 3 2013-05-07 11:02:18 -07:00
keucr keucr: switch to ->show_info() 2013-04-09 14:13:20 -04:00
line6
media Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2013-05-02 14:38:53 -07:00
netlogic
nvec staging: nvec: allow modular build 2013-04-23 10:34:20 -07:00
octeon
olpc_dcon staging: olpc_dcon: return NOTIFY_DONE instead of the 0. 2013-03-25 11:02:55 -07:00
ozwpan staging/ozwpan: info leak in oz_cdev_ioctl() 2013-04-22 10:25:46 -07:00
panel
phison
quickstart
rtl8187se staging: single_open() leaks 2013-05-05 00:15:43 -04:00
rtl8192e hostap: Don't use create_proc_read_entry() 2013-04-29 15:41:56 -04:00
rtl8192u staging: single_open() leaks 2013-05-05 00:15:43 -04:00
rtl8712
rts5139 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
sb105x staging: sb105x: Fix typo in comments and printk 2013-03-25 11:17:33 -07:00
sbe-2t3e3
sep staging: sep: Fix typo in printk within sep driver 2013-03-28 16:06:27 -07:00
serqt_usb2
silicom Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
slicoss staging: slicoss: information leak in ETHTOOL_GSET 2013-04-05 14:17:00 -07:00
sm7xxfb
speakup staging: speakup: remove custom string_unescape_any_inplace 2013-04-30 17:04:03 -07:00
ste_rmi4 ARM: arm-soc multiplatform updates for 3.10 2013-05-02 09:38:16 -07:00
ti-soc-thermal staging: ti-soc-thermal: fix device removal 2013-04-08 10:35:09 -07:00
tidspbridge staging: tidspbridge: rmgr: proc.c: fix checkpatch errors 2013-03-25 11:02:56 -07:00
usbip staging: usbip: userspace: show product name in `list -l' command 2013-04-05 14:22:52 -07:00
vme staging: vme: fix for a potential NULL pointer dereference 2013-03-25 11:17:33 -07:00
vt6655 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
vt6656 staging: vt6656: use free_netdev instead of kfree 2013-05-13 05:52:33 -07:00
winbond
wlags49_h2 staging: single_open() leaks 2013-05-05 00:15:43 -04:00
wlags49_h25
wlan-ng staging: wlan-ng: prism2usb.c: fix printk(KERN_ERR... to dev_err(dev, ... 2013-03-26 16:13:20 -07:00
xgifb staging: xgifb: rename SR15/SR13 arrays to SR18 2013-03-28 16:10:16 -07:00
zcache staging: zcache: enable zcache to be built/loaded as a module 2013-04-30 17:04:01 -07:00
zram zram: fix zram_bvec_read duplicate dump failure message and stat accumulation 2013-03-18 17:42:34 -07:00
zsmalloc staging/zsmalloc: don't use pgtable-mapping from modules 2013-04-23 10:34:20 -07:00
Kconfig staging: net: remove pc300 driver 2013-04-19 11:15:20 -07:00
Makefile staging: net: remove pc300 driver 2013-04-19 11:15:20 -07:00
staging.c