linux/drivers/staging
Ian Abbott abe46b8932 staging: comedi: adv_pci1710: fix AI INSN_READ for non-zero channel
Reading of analog input channels by the `INSN_READ` comedi instruction
is broken for all except channel 0.  `pci171x_ai_insn_read()` calls
`pci171x_ai_read_sample()` with the wrong value for the third parameter.
It is supposed to be the current index in a channel list (which is
always of length 1 in this case, so the index should be 0), but instead
it is passing the actual channel number.  `pci171x_ai_read_sample()`
checks the channel number encoded in the raw sample value read from the
hardware matches the channel number stored in the specified index of the
previously set up channel list and returns `-ENODATA` if it doesn't
match.  Since the index should always be 0 in this case, the match will
fail unless the channel number is also 0.  Fix it by passing 0 as the
channel index.

Note that when the bug first appeared, it was `pci171x_ai_dropout()`
that was called with the wrong parameter value.  `pci171x_ai_dropout()`
got replaced with `pci171x_ai_read_sample()` in commit 7fd2dae250
("staging: comedi: adv_pci1710: introduce pci171x_ai_read_sample()").

Fixes: 16c7eb6047 ("staging: comedi: adv_pci1710: always enable PCI171x_PARANOIDCHECK code")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: stable <stable@vger.kernel.org> # 3.16+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 19:25:59 -08:00
..
android Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
board Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:36:45 -08:00
clocking-wizard staging: clocking-wizard: Handle invalid clk in notifier 2015-01-17 16:06:20 -08:00
comedi staging: comedi: adv_pci1710: fix AI INSN_READ for non-zero channel 2015-03-01 19:25:59 -08:00
dgap staging: dgap: fix "if" statement that always evaluates to true 2015-01-25 20:08:13 +08:00
dgnc drivers/staging: use current->state helpers 2015-01-28 11:25:28 -08:00
emxx_udc Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:36:45 -08:00
fbtft staging: fbtft: remove redundant .owner 2015-01-28 11:28:44 -08:00
ft1000 staging: ft1000: fix braces warning 2015-02-07 17:37:52 +08:00
fwserial
gdm72xx
gdm724x staging: gdm724x: fix line limit coding style issue in gdm_lte.c 2015-01-17 14:57:43 -08:00
goldfish
gs_fpgaboot staging: gs_fpgaboot: io.c: Remove unused function 2015-01-17 15:19:52 -08:00
i2o i2o: move to staging 2015-02-03 15:58:39 -08:00
iio First round of fixes for IIO in the 4.0 cycle. Note a followup 2015-02-28 07:15:09 -08:00
lustre switch ll_lookup_finish_locks() and ll_revalidate_it_finish() to inode 2015-02-17 22:14:37 -05:00
media Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
mt29f_spinand staging: mt29f_spinand: Fix typo in Kconfig 2015-01-17 16:22:15 -08:00
netlogic Staging: NetLogic: Coding style correction 2015-01-17 15:17:10 -08:00
nvec staging: nvec: specify a platform-device base id 2015-01-25 19:04:31 +08:00
octeon Staging: octeon: Fixed a typo 2015-01-17 15:00:23 -08:00
octeon-usb Staging: octeon-usb: Fixed a typo 2015-01-17 15:00:23 -08:00
olpc_dcon staging: olpc_dcon: fix sparse symbol not declared warning 2015-01-17 15:17:10 -08:00
ozwpan
panel drivers/staging: use current->state helpers 2015-01-28 11:25:28 -08:00
rtl8188eu staging: rtl8188eu: core: switch with redundant cases 2015-02-07 17:37:52 +08:00
rtl8192e Staging: rtl8192e: Fixed unnecessary line continuation. 2015-02-07 17:25:43 +08:00
rtl8192u Staging: rtl8192u: Use put_unaligned_le16 in rtl819x_BAProc.c 2015-01-28 11:12:35 -08:00
rtl8712 staging: rtl8712: Do coding style cleanup 2015-02-07 17:39:50 +08:00
rtl8723au Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
rts5208 staging: rts5208: use msecs_to_jiffies for timeouts 2015-01-25 19:59:19 +08:00
skein staging: skein: Fixing single statement macro checkpatch warning 2015-01-17 15:05:52 -08:00
slicoss
sm7xxfb staging: sm7xxfb: fix remaining CamelCase 2015-02-07 17:37:52 +08:00
speakup Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
ste_rmi4
unisys staging: unisys: Fix typo in comment 2015-02-07 17:18:38 +08:00
vme
vt6655 staging: vt6655: vnt_rx_data add track rsr and new_rsr errors 2015-02-07 17:16:59 +08:00
vt6656 staging: vt6656: parse cts fall back out of vnt_fill_cts_head 2015-02-07 17:16:59 +08:00
wlan-ng Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
xgifb staging: xgifb: fix colours on big-endian machines other than powerpc 2015-02-07 17:24:11 +08:00
Kconfig Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
Makefile Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
staging.c