summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-02-05 17:28:51 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-05 18:07:12 -0800
commita348b72eae946dd5d2cc9e00c4344c7814979eb0 (patch)
treee68764a3d03572e2e5bdb0dfc2e097516b36f8c3 /drivers/staging/comedi
parent03754bdbb10a8045b2c18cfec8f2272d7df004c6 (diff)
staging: comedi: vmk80xx: remove digital output (*insn_write)
The comedi core can use the (*insn_bits) function to emulate the (*insn_write) function. Remove the unnecessary (*insn_read) function. Signed-off-by: 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')
-rw-r--r--drivers/staging/comedi/drivers/vmk80xx.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index 4f32bad0136f..ba4fd5202791 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -750,55 +750,6 @@ static int vmk80xx_di_insn_read(struct comedi_device *dev,
return n;
}
-static int vmk80xx_do_insn_write(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn,
- unsigned int *data)
-{
- struct vmk80xx_private *devpriv = dev->private;
- int chan;
- unsigned char *tx_buf;
- int reg;
- int cmd;
- int n;
-
- n = rudimentary_check(devpriv, DIR_OUT);
- if (n)
- return n;
-
- down(&devpriv->limit_sem);
- chan = CR_CHAN(insn->chanspec);
-
- tx_buf = devpriv->usb_tx_buf;
-
- for (n = 0; n < insn->n; n++) {
- if (devpriv->model == VMK8055_MODEL) {
- reg = VMK8055_DO_REG;
- cmd = VMK8055_CMD_WRT_AD;
- if (data[n] == 1)
- tx_buf[reg] |= (1 << chan);
- else
- tx_buf[reg] ^= (1 << chan);
- } else { /* VMK8061_MODEL */
- reg = VMK8061_DO_REG;
- if (data[n] == 1) {
- cmd = VMK8061_CMD_SET_DO;
- tx_buf[reg] = 1 << chan;
- } else {
- cmd = VMK8061_CMD_CLR_DO;
- tx_buf[reg] = 0xff - (1 << chan);
- }
- }
-
- if (vmk80xx_write_packet(devpriv, cmd))
- break;
- }
-
- up(&devpriv->limit_sem);
-
- return n;
-}
-
static int vmk80xx_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
@@ -1209,7 +1160,6 @@ static int vmk80xx_attach_common(struct comedi_device *dev)
s->n_chan = 8;
s->maxdata = 1;
s->range_table = &range_digital;
- s->insn_write = vmk80xx_do_insn_write;
s->insn_bits = vmk80xx_do_insn_bits;
/* Counter subdevice */