aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtl8192e
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2019-03-27 15:15:15 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-29 17:10:18 +0100
commit5c724e197eb57336696a0a573b199a273db9466b (patch)
treef7f1fc27d9b33bd1ba8004e62869a9f0aca62ec6 /drivers/staging/rtl8192e/rtl8192e
parentstaging: pi433: Fix rf69_set_tx_cfg() logic (diff)
downloadlinux-dev-5c724e197eb57336696a0a573b199a273db9466b.tar.xz
linux-dev-5c724e197eb57336696a0a573b199a273db9466b.zip
staging: comedi: ni_tio: Use data[insn->n-1] in ni_tio_insn_write()
The `insn_write` handler for the counter subdevices (`ni_tio_insn_write()`) writes a single data value `data[0]` to the channel. Technically, `insn->n` specifies the number of successive values from `data[]` to write to the channel, but when there is little benefit in writing multiple data values, the usual Comedi convention is to just write the last data value `data[insn->n - 1]`. Change the function to follow that convention and use `data[insn->n - 1]` instead of `data[0]`. (In practice, `insn->n` would normally be 1 anyway.) Also follow the usual Comedi convention and return `insn->n` from the handler to indicate success instead of 0 (although any non-negative return value will do). Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtl8192e')
0 files changed, 0 insertions, 0 deletions