]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: ni_660x: tidy up ni_660x_set_pfi_routing()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 22 Mar 2016 18:10:33 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
commit0cb4a002cf17538550478aded2039520aacaca71
tree61df2056e9f822b4497b2ff6c707d05082a6f9b4
parenta697417a1e819705e6e5cdc065b0b3bd9818a08a
staging: comedi: ni_660x: tidy up ni_660x_set_pfi_routing()

Use the comedi.h provided constants (enum ni_660x_pfi_routing) instead
of defining new ones for the output sources.

Use a switch to clarify the channel/source validation.

For aesthetics, rename the private data members 'pfi_output_selects' and
'pfi_direction_bits'.

Remove the 'min_counter_pfi_chan' and 'max_dio_pfi_chan' from
enum ni_660x_constants. The open coded values make the code easier
to follow.

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