summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2016-07-20 17:07:34 +0100
committerSasha Levin <alexander.levin@verizon.com>2016-09-12 09:44:54 -0400
commitf27b8038ac64fde76cc2910b82ec2e0f901a95f6 (patch)
tree967f1bdab414c40079f721a822258a301db050ef
parent33f100b86ffdb9bdfe682bb3b148dca1b8c1aefa (diff)
downloadlwn-f27b8038ac64fde76cc2910b82ec2e0f901a95f6.tar.gz
lwn-f27b8038ac64fde76cc2910b82ec2e0f901a95f6.zip
staging: comedi: ni_mio_common: fix wrong insn_write handler
[ Upstream commit 5ca05345c56cb979e1a25ab6146437002f95cac8 ] 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: Ian Abbott <abbotti@mev.co.uk> Reported-by: Éric Piel <piel@delmic.com> Fixes: 10f74377eec3 ("staging: comedi: ni_tio: make ni_tio_winsn() a proper comedi (*insn_write)" Cc: <stable@vger.kernel.org> # 3.17+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r--drivers/staging/comedi/drivers/ni_mio_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 34b3a522668f..92abb8b32dcc 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -5635,7 +5635,7 @@ static int ni_E_init(struct comedi_device *dev,
s->maxdata = (devpriv->is_m_series) ? 0xffffffff
: 0x00ffffff;
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;
#ifdef PCIDMA
if (dev->irq && devpriv->mite) {