From: Ian Abbott Date: Tue, 29 May 2012 14:51:41 +0000 (+0100) Subject: amplc_pc263: Correct initial state X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d97ef9008471a9a3262414df481723a01a983a22;p=comedi.git amplc_pc263: Correct initial state The initial state of the relays is being read incorrectly. Fix it. Signed-off-by: Ian Abbott --- diff --git a/comedi/drivers/amplc_pc263.c b/comedi/drivers/amplc_pc263.c index 75746ad2..2b907535 100644 --- a/comedi/drivers/amplc_pc263.c +++ b/comedi/drivers/amplc_pc263.c @@ -312,8 +312,7 @@ static int pc263_attach(comedi_device * dev, 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); if (thisboard->bustype == isa_bustype) {