diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-12 22:16:24 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-12 22:16:24 (GMT) |
commit | 99ac7cccb50fcbacdc21620a898e6d64b58a2282 (patch) | |
tree | 7c1b46ef02e55e60c77b06f7ecc975aca998764d /drivers/staging/comedi/drivers.c | |
parent | 5dacadcca3176e2b1f8db662e503c080484d71fa (diff) | |
download | linux-99ac7cccb50fcbacdc21620a898e6d64b58a2282.tar.xz |
Revert "staging: comedi: core: introduce comedi_dio_insn_config()"
This reverts commit 4f76463d3b8f8cc0cac5bb292ec766848f3f4fa1.
I applied an incorrect version here as well :(
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers.c')
-rw-r--r-- | drivers/staging/comedi/drivers.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 60fd81c..791a26b 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -150,46 +150,6 @@ int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s, return -EINVAL; } -/** - * comedi_dio_insn_config() - boilerplate (*insn_config) for DIO subdevices. - * @dev: comedi_device struct - * @s: comedi_subdevice struct - * @insn: comedi_insn struct - * @data: parameters for the @insn - * @mask: io_bits mask for grouped channels - */ -int comedi_dio_insn_config(struct comedi_device *dev, - struct comedi_subdevice *s, - struct comedi_insn *insn, - unsigned int *data, - unsigned int mask) -{ - unsigned int chan_mask = 1 << CR_CHAN(insn->chanspec); - - if (!mask) - mask = chan_mask; - - switch (data[0]) { - case INSN_CONFIG_DIO_INPUT: - s->io_bits &= ~mask; - break; - - case INSN_CONFIG_DIO_OUTPUT: - s->io_bits |= mask; - break; - - case INSN_CONFIG_DIO_QUERY: - data[1] = (s->io_bits & mask) ? COMEDI_OUTPUT : COMEDI_INPUT; - return insn->n; - - default: - return -EINVAL; - } - - return 0; -} -EXPORT_SYMBOL_GPL(comedi_dio_insn_config); - static int insn_rw_emulate_bits(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) |