/* fl512_ao_insn : used to write to a DA port n times  */
static int fl512_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
/* fl512_ao_insn : used to write to a DA port n times  */
static int fl512_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
	int n;
	int chan = CR_CHAN(insn->chanspec);
	unsigned long iobase = dev->iobase;
	for (n = 0; n < insn->n; n++) {
		outb(data[n] & 0x0ff, iobase + 4 + 2 * chan);
		outb((data[n] & 0xf00) >> 8, iobase + 4 + 2 * chan);
		inb(iobase + 4 + 2 * chan);
		devpriv->ao_readback[chan] = data[n];
	}
	return n;
}