Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f989000 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: amplc_pc263: Correct initial state



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: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a46e759f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -330,8 +330,7 @@ static int pc263_attach(struct comedi_device *dev, struct comedi_devconfig *it)
	/* 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) {