diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index f2f75b9dfb8636dfec57355eb860f99f71a13fbd..98058b9097e6197883f142a588835da6666166ad 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -342,10 +342,6 @@ void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset, /* drivers.c - general comedi driver functions */ -int comedi_dio_insn_config(struct comedi_device *, struct comedi_subdevice *, - struct comedi_insn *, unsigned int *data, - unsigned int mask); - void *comedi_alloc_devpriv(struct comedi_device *, size_t); int comedi_alloc_subdevices(struct comedi_device *, int); diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 60fd81c71a127691edb466748900b4534d61ca5e..791a26bd5f63c7fb9f937e2f2e04b055b473fb28 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)