]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: pcl726: fix the analog output range_table_list initialization
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 25 Sep 2013 22:37:18 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 16:32:19 +0000 (09:32 -0700)
commit716343c43891dcb865bd9f2603e68804d3cc5660
tree8206fef45a88941752ca103f486be29fe398fdcb
parentfff46207245cd9e39c05b638afaee2478e64914b
staging: comedi: pcl726: fix the analog output range_table_list initialization

The analog output channels use jumpers on the board to individually set
the range used. This driver uses the configuration options passed to the
(*attach) function to setup the analog output subdevice range_table_list
for each channel.

The configuration options should be 'it->options[2 + i]' for each channel 'i'
not '...[2 + 1]' for each channel. Fix the error and move the code so that
the range_table_list is setup before the subdevice is initialized.

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