return insn->n;
}
-static int pci9118_insn_bits_do(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn,
- unsigned int *data)
-{
- /*
- * The digital outputs are set with the same register that
- * the digital inputs and outputs are read from. But the
- * outputs are set with bits [3:0] so we can simply write
- * the s->state to set them.
- */
- if (comedi_dio_update_state(s, data))
- outl(s->state, dev->iobase + PCI9118_DIO_REG);
-
- data[1] = s->state;
-
- return insn->n;
-}
-
static void interrupt_pci9118_ai_mode4_switch(struct comedi_device *dev)
{
struct pci9118_private *devpriv = dev->private;
return ret;
}
+static int pci9118_do_insn_bits(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ struct comedi_insn *insn,
+ unsigned int *data)
+{
+ /*
+ * The digital outputs are set with the same register that
+ * the digital inputs and outputs are read from. But the
+ * outputs are set with bits [3:0] so we can simply write
+ * the s->state to set them.
+ */
+ if (comedi_dio_update_state(s, data))
+ outl(s->state, dev->iobase + PCI9118_DIO_REG);
+
+ data[1] = s->state;
+
+ return insn->n;
+}
+
static int pci9118_reset(struct comedi_device *dev)
{
struct pci9118_private *devpriv = dev->private;
s->n_chan = 4;
s->maxdata = 1;
s->range_table = &range_digital;
- s->insn_bits = pci9118_insn_bits_do;
+ s->insn_bits = pci9118_do_insn_bits;
devpriv->ai_maskharderr = 0x10a;
/* default measure crash condition */