Skip to content

Commit

Permalink
staging: comedi: ni_mio_common: fix wrong insn_write handler
Browse files Browse the repository at this point in the history
commit 5ca0534 upstream.

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: 10f7437 ("staging: comedi: ni_tio: make ni_tio_winsn() a proper comedi (*insn_write)")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Sep 11, 2016
1 parent 553a1f6 commit f842188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/ni_mio_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -4404,7 +4404,7 @@ static int ni_E_init(struct comedi_device *dev)
else
s->maxdata = 0xffffff;
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
s->subdev_flags |= SDF_CMD_READ /* | SDF_CMD_WRITE */;
Expand Down

0 comments on commit f842188

Please sign in to comment.