From: Frank Mori Hess Date: Wed, 21 Feb 2007 03:23:27 +0000 (+0000) Subject: Bug fix from Edwin Steiner : X-Git-Tag: r0_7_74~110 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fc622de480058d9de5aece229699b1489fdca65a;p=comedi.git Bug fix from Edwin Steiner : The problem is that in ni_m_series_load_channelgain_list config_bits is not reset to 0 in the loop over the channels. --- diff --git a/Contributors b/Contributors index d921923c..3c9d0a35 100644 --- a/Contributors +++ b/Contributors @@ -46,6 +46,7 @@ Robert Schwebel Steve D Sharples Joe Smith Anne Smorthit +Edwin Steiner Oystein Svendsen Caleb Tennis Salvador Eduardo Tropea diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index c928f1c1..d69d88b5 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -1440,7 +1440,6 @@ static void ni_m_series_load_channelgain_list(comedi_device *dev,unsigned int n_ { unsigned int chan, range, aref; unsigned int i; - unsigned config_bits = 0; unsigned offset; unsigned int dither; unsigned range_code; @@ -1473,6 +1472,7 @@ static void ni_m_series_load_channelgain_list(comedi_device *dev,unsigned int n_ offset = 0; for(i = 0; i < n_chan; i++) { + unsigned config_bits = 0; chan = CR_CHAN(list[i]); aref = CR_AREF(list[i]); range = CR_RANGE(list[i]); @@ -1480,7 +1480,6 @@ static void ni_m_series_load_channelgain_list(comedi_device *dev,unsigned int n_ range_code = ni_gainlkup[boardtype.gainlkup][range]; devpriv->ai_offset[i] = offset; - switch( aref ) { case AREF_DIFF: