]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: ni_mio_common: use CR_CHAN more consistently
authorSpencer E. Olson <olsonse@umich.edu>
Tue, 12 Jan 2016 18:05:10 +0000 (11:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 02:35:16 +0000 (18:35 -0800)
commit2ae179a31ffaeeebe981d222b0dd484ac5b82af0
treeaa7775d120bc48117e70cebe89535ca59dff0c7f
parent08405bde05cf800851b101990c9af10bf9d4f1eb
staging: comedi: ni_mio_common: use CR_CHAN more consistently

Generally, the CR_CHAN macro is/should be used to access the relevant bits
for channel identification in cmd->*_arg when the corresponding
cmd->*_src==TRIG_EXT, including cmd->convert_arg in this case.

This patch does not fix a bug per se, as NISTC_AI_MODE1_CONVERT_SRC() already
masks the value sufficiently, but using CR_CHAN() here makes the code clearer as
it avoids passing some irrelevant bits to NISTC_AI_MODE1_CONVERT_SRC() in the
first place.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
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