diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2012-05-30 18:04:35 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-05 03:48:06 (GMT) |
commit | 9f989000b54fe3131104bb26f1cc7bd0fab92e40 (patch) | |
tree | 5da42d73607f7e4a40063ba9a84002b0862df268 /drivers | |
parent | a46e759fc05a048530da43f241c8f07e0624232c (diff) | |
download | linux-fsl-qoriq-9f989000b54fe3131104bb26f1cc7bd0fab92e40.tar.xz |
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: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_pc263.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pc263.c b/drivers/staging/comedi/drivers/amplc_pc263.c index 086579f..e2dbf74 100644 --- a/drivers/staging/comedi/drivers/amplc_pc263.c +++ b/drivers/staging/comedi/drivers/amplc_pc263.c @@ -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) { |