staging: comedi: ni_660x: cleanup the NI660X_DMA_CFG register helpers
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 22 Mar 2016 18:10:19 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
commitfecf4cce0021aebd587f7bbd970806c24988ef26
tree0ab2043b7ffc4534fbad2e906194573cabf98dfd
parent502552e161aee965026f9b5cc0da3dfb3775a8c7
staging: comedi: ni_660x: cleanup the NI660X_DMA_CFG register helpers

The BUG_ON() checks in the helper functions are not necessary. The mite
driver quiries the PCI chip to determine the number of DMA channels.
This is then used when a DMA channel is requested so the channel will
always be in range.

Convert the inline functions used to set the bits in the NI600X_DMA_CFG
register into macros. Also convert the associated enum dma_selection.
This clarifies the association with the register.

Rename the associated 'dma_configuration_soft_copies' member of the
private data to allow shorting some of the ugly long lines in the
driver.

This also fixes a number of checkpatch.pl issues about:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

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_660x.c