From d97ef9008471a9a3262414df481723a01a983a22 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Tue, 29 May 2012 15:51:41 +0100 Subject: [PATCH] amplc_pc263: Correct initial state The initial state of the relays is being read incorrectly. Fix it. Signed-off-by: Ian Abbott --- comedi/drivers/amplc_pc263.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) { -- 2.26.2