]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: addi_apci_3xxx: fix ai subdevice 'len_chanlist'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 17 Apr 2014 17:07:48 +0000 (10:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Apr 2014 17:21:29 +0000 (10:21 -0700)
commitab1d673ecbbc819a9240ee0462511c51e54dd316
tree6e1889926e4385d9816e1a636b108b6bfdb0d9ee
parentcc1f5f2b3fda9ab9570c469a8677743240156224
staging: comedi: addi_apci_3xxx: fix ai subdevice 'len_chanlist'

Due to a driver limitation, the (*do_cmdtest) for the analog input subdevice
overrides the cmd->chanlist_len to force single channel chanlists. But, the
cmd->scan_end_arg was already validated before this happens. Instead of
fixing the (*do_cmdtest) just set the subdevice len_chanlist to 1 to limit
the chanlist size. Move the comment also.

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/addi_apci_3xxx.c