staging: comedi: ni_stc.h: reg_type is not needed by MSeries_AI_Config_Bank_Bits()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 1 May 2015 21:58:32 +0000 (14:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 May 2015 17:05:03 +0000 (19:05 +0200)
commitf496471df95ef0a218d5ad8af9d6954f88c7072f
treea34d262f3a418743919470ae87ff2a27d98e80be
parentd2dde226094cb4d6e3116da09bf2d9803785683d
staging: comedi: ni_stc.h: reg_type is not needed by MSeries_AI_Config_Bank_Bits()

This helper function sets the bits in the M_Offset_AI_Config_FIFO_Data register
to select the correct bank to configure a given analog output channel. The NI
M Series boards are defined by the boardinfo to have 16, 32, or 80 channels.
Only 2 of the M Series boards have 80 channels, those boards happen to have a
reg_type of ni_reg_622x.

The bank for the 16 and 32 channel boards is selected by the 'channel & 0x30'
calculation (comedi channels 0 to 15 or 31). This also selects the bank for the
first 64 channels of the 80 channel boards. The additional '|= 0x400' sets the
bank to access the extra channels (comedi channels >= 63).

Since all the non ni_reg_622x boards have at most 32 channels, the extra check
of the 'reg_type' is not required in this function. Remove it as well as the
parameter.

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
drivers/staging/comedi/drivers/ni_stc.h
This page took 0.024959 seconds and 5 git commands to generate.