staging: comedi: ni_mio_common: scale ao INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

Fixes implementation of INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS for
ni_mio devices.  The previous patch should have used the channel
information passed in to scale the result by the number of channels being
used.

Fixes: 51fd367383 ("staging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS")
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>
This commit is contained in:
Spencer E. Olson 2018-10-24 08:46:59 -06:00 коммит произвёл Greg Kroah-Hartman
Родитель 651022382c
Коммит 9a1ec4eb6f
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -2843,7 +2843,8 @@ static int ni_ao_insn_config(struct comedi_device *dev,
return ni_ao_arm(dev, s);
case INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS:
/* we don't care about actual channels */
data[1] = board->ao_speed;
/* data[3] : chanlist_len */
data[1] = board->ao_speed * data[3];
data[2] = 0;
return 0;
default: