aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-02-05 14:59:53 -0700
committerBen Hutchings <ben@decadent.org.uk>2014-04-02 00:58:50 +0100
commit78f94be0386e7b4d2a871950038b66242ff662db (patch)
tree711546cffdc77db252e32b1a9e474fe272cf694b /drivers/block
parent7fd7398a897d649086c8f86626ed1d082413a6a0 (diff)
downloadkernel_samsung_smdk4412-78f94be0386e7b4d2a871950038b66242ff662db.zip
kernel_samsung_smdk4412-78f94be0386e7b4d2a871950038b66242ff662db.tar.gz
kernel_samsung_smdk4412-78f94be0386e7b4d2a871950038b66242ff662db.tar.bz2
staging: comedi: adv_pci1710: fix analog output readback value
commit 1e85c1ea1ff2a60659e790ef8ec76c7339445841 upstream. The last value written to a analog output channel is cached in the private data of this driver for readback. Currently, the wrong value is cached in the (*insn_write) functions. The current code stores the data[n] value for readback afer the loop has written all the values. At this time 'n' points past the end of the data array. Fix the functions by using a local variable to hold the data being written to the analog output channel. This variable is then used after the loop is complete to store the readback value. The current value is retrieved before the loop in case no values are actually written.. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions