From: Ian Abbott Date: Wed, 20 Jul 2016 16:07:34 +0000 (+0100) Subject: staging: comedi: ni_mio_common: fix wrong insn_write handler X-Git-Tag: v4.8-rc5~8^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ca05345c56cb979e1a25ab6146437002f95cac8;p=platform%2Fkernel%2Flinux-exynos.git staging: comedi: ni_mio_common: fix wrong insn_write handler 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 Reported-by: Éric Piel Fixes: 10f74377eec3 ("staging: comedi: ni_tio: make ni_tio_winsn() a proper comedi (*insn_write)" Cc: # 3.17+ Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 8dabb19..3cf3c05 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -5480,7 +5480,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) {