The initial state of the relays is being read incorrectly. It's reading
a single 8-bit port twice, but should be reading two consecutive 8-bit
ports. Fix it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/* all outputs */
s->io_bits = 0xffff;
/* read initial relay state */
- s->state = inb(dev->iobase);
- s->state = s->state | (inb(dev->iobase) << 8);
+ s->state = inb(dev->iobase) | (inb(dev->iobase + 1) << 8);
printk(KERN_INFO "comedi%d: %s ", dev->minor, dev->board_name);
switch (thisboard->bustype) {