diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-08-30 18:09:44 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 14:47:41 (GMT) |
commit | ca5d4a20fb65a2ab2ad3c2797d7639d3dc64c147 (patch) | |
tree | fe5d46787ae20270643bde61f4aa84f4744af644 | |
parent | a485f4d60e7de92b65e3f03ccd6c3b8cb0062c32 (diff) | |
download | linux-fsl-qoriq-ca5d4a20fb65a2ab2ad3c2797d7639d3dc64c147.tar.xz |
staging: comedi: addi_apci_3xxx: use comedi_dio_update_state()
The extra mask used to only update the channels configured as outputs is
not necessary in this driver. Remove it and use comedi_dio_update_state()
to handle the boilerplate code to update the subdevice s->state.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/addi_apci_3xxx.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index fcec604..761cbf8 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -711,16 +711,11 @@ static int apci3xxx_dio_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - unsigned int mask = data[0]; - unsigned int bits = data[1]; + unsigned int mask; unsigned int val; - /* only update output channels */ - mask &= s->io_bits; + mask = comedi_dio_update_state(s, data); if (mask) { - s->state &= ~mask; - s->state |= (bits & mask); - if (mask & 0xff) outl(s->state & 0xff, dev->iobase + 80); if (mask & 0xff0000) |