fix initialization of channel, that I broke with last fix
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 4 Apr 2004 16:40:15 +0000 (16:40 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 4 Apr 2004 16:40:15 +0000 (16:40 +0000)
comedi/drivers/cb_pcidas.c

index 33169ee011c91a795cff8aabcef7c7f5a48fbb9d..9f5821b7c6c75aaef810dd8e36d294b2547af297 100644 (file)
@@ -889,13 +889,14 @@ static int cb_pcidas_ao_nofifo_winsn(comedi_device *dev, comedi_subdevice *s,
 static int cb_pcidas_ao_fifo_winsn(comedi_device *dev, comedi_subdevice *s,
        comedi_insn *insn, lsampl_t *data)
 {
-       int bits, channel;
+       int channel;
        unsigned long flags;
 
        // clear dac fifo
        outw(0, devpriv->ao_registers + DACFIFOCLR);
 
        // set channel and range
+       channel = CR_CHAN(insn->chanspec);
        comedi_spin_lock_irqsave( &dev->spinlock, flags );
        devpriv->ao_control_bits &= ~DAC_MODE_UPDATE_BOTH & ~DAC_RANGE_MASK( channel ) &
                ~DAC_START & ~DAC_PACER_MASK;