aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_labpc.c')
-rw-r--r--drivers/staging/comedi/drivers/ni_labpc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index ab8f37022a3..9b204b4d1e7 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -1241,7 +1241,9 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
1241 else 1241 else
1242 channel = CR_CHAN(cmd->chanlist[0]); 1242 channel = CR_CHAN(cmd->chanlist[0]);
1243 /* munge channel bits for differential / scan disabled mode */ 1243 /* munge channel bits for differential / scan disabled mode */
1244 if (labpc_ai_scan_mode(cmd) != MODE_SINGLE_CHAN && aref == AREF_DIFF) 1244 if ((labpc_ai_scan_mode(cmd) == MODE_SINGLE_CHAN ||
1245 labpc_ai_scan_mode(cmd) == MODE_SINGLE_CHAN_INTERVAL) &&
1246 aref == AREF_DIFF)
1245 channel *= 2; 1247 channel *= 2;
1246 devpriv->command1_bits |= ADC_CHAN_BITS(channel); 1248 devpriv->command1_bits |= ADC_CHAN_BITS(channel);
1247 devpriv->command1_bits |= thisboard->ai_range_code[range]; 1249 devpriv->command1_bits |= thisboard->ai_range_code[range];