diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-02-05 17:29:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-05 18:07:12 -0800 |
commit | 0f97889c19bfedf102ec6e1fdd7f99a8342d4f22 (patch) | |
tree | 5a15f7800f14b5721c4c953604aed97e3d774ebd /drivers/staging | |
parent | a348b72eae946dd5d2cc9e00c4344c7814979eb0 (diff) | |
download | linux-stable-0f97889c19bfedf102ec6e1fdd7f99a8342d4f22.tar.gz linux-stable-0f97889c19bfedf102ec6e1fdd7f99a8342d4f22.tar.bz2 linux-stable-0f97889c19bfedf102ec6e1fdd7f99a8342d4f22.zip |
staging: comedi: vmk80xx: remove digital input (*insn_read)
The comedi core can use the (*insn_bits) function to emulate the
(*insn_read) 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')
-rw-r--r-- | drivers/staging/comedi/drivers/vmk80xx.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c index ba4fd5202791..d728c057f09e 100644 --- a/drivers/staging/comedi/drivers/vmk80xx.c +++ b/drivers/staging/comedi/drivers/vmk80xx.c @@ -704,52 +704,6 @@ static int vmk80xx_di_insn_bits(struct comedi_device *dev, return retval; } -static int vmk80xx_di_insn_read(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 *rx_buf; - int reg; - int inp; - int n; - - n = rudimentary_check(devpriv, DIR_IN); - if (n) - return n; - - down(&devpriv->limit_sem); - chan = CR_CHAN(insn->chanspec); - - rx_buf = devpriv->usb_rx_buf; - - if (devpriv->model == VMK8061_MODEL) { - reg = VMK8061_DI_REG; - devpriv->usb_tx_buf[0] = VMK8061_CMD_RD_DI; - } else { - reg = VMK8055_DI_REG; - } - for (n = 0; n < insn->n; n++) { - if (vmk80xx_read_packet(devpriv)) - break; - - if (devpriv->model == VMK8055_MODEL) - inp = (((rx_buf[reg] >> 4) & 0x03) | - ((rx_buf[reg] << 2) & 0x04) | - ((rx_buf[reg] >> 3) & 0x18)); - else - inp = rx_buf[reg]; - - data[n] = (inp >> chan) & 1; - } - - up(&devpriv->limit_sem); - - return n; -} - static int vmk80xx_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, @@ -1150,7 +1104,6 @@ static int vmk80xx_attach_common(struct comedi_device *dev) s->n_chan = boardinfo->di_nchans; s->maxdata = 1; s->range_table = &range_digital; - s->insn_read = vmk80xx_di_insn_read; s->insn_bits = vmk80xx_di_insn_bits; /* Digital output subdevice */ |