staging: comedi: ni_mio_common: introduce NI_STC_DMA_CHAN_SEL()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 14 Apr 2016 16:58:07 +0000 (09:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 05:17:28 +0000 (22:17 -0700)
commit6f7fa704648e69a295f6b8bcf35538692258fbb3
tree0506b040fb3d49e4bf94729e6e1b7bcba251f528
parentbbd962206c6002005a827d34d91005cbfbf9dddc
staging: comedi: ni_mio_common: introduce NI_STC_DMA_CHAN_SEL()

The inline helper ni_stc_dma_channel_select_bitfield() returns the
bits needed to select a MITE channel to use for DMA. The MITE code
is setup to handle up to 8 channels but in reality only channels 0
to 3 are used by most of the drivers. The PCI-6032E and PCI-6033E
boards can also use channels 4 and 5.

For aesthetics, convert this inline function into a macro and
remove the BUG() which will never occur.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_common.c