Commit f27b8038 authored by Ian Abbott's avatar Ian Abbott Committed by Sasha Levin

staging: comedi: ni_mio_common: fix wrong insn_write handler

[ Upstream commit 5ca05345 ]

For counter subdevices, the `s->insn_write` handler is being set to the
wrong function, `ni_tio_insn_read()`.  It should be
`ni_tio_insn_write()`.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reported-by: default avatarÉric Piel <piel@delmic.com>
Fixes: 10f74377 ("staging: comedi: ni_tio: make ni_tio_winsn() a
  proper comedi (*insn_write)"
Cc: <stable@vger.kernel.org> # 3.17+
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 33f100b8
...@@ -5635,7 +5635,7 @@ static int ni_E_init(struct comedi_device *dev, ...@@ -5635,7 +5635,7 @@ static int ni_E_init(struct comedi_device *dev,
s->maxdata = (devpriv->is_m_series) ? 0xffffffff s->maxdata = (devpriv->is_m_series) ? 0xffffffff
: 0x00ffffff; : 0x00ffffff;
s->insn_read = ni_tio_insn_read; s->insn_read = ni_tio_insn_read;
s->insn_write = ni_tio_insn_read; s->insn_write = ni_tio_insn_write;
s->insn_config = ni_tio_insn_config; s->insn_config = ni_tio_insn_config;
#ifdef PCIDMA #ifdef PCIDMA
if (dev->irq && devpriv->mite) { if (dev->irq && devpriv->mite) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment