From: Lars-Peter Clausen Date: Wed, 25 Apr 2012 07:44:54 +0000 (+0200) Subject: staging:iio:dac:ad5446: Fix 24bit transfers X-Git-Tag: v3.5-rc1~145^2~229^2~75 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af836d9a38aec16a99c9c9bee114111db8b9e8df;p=pandora-kernel.git staging:iio:dac:ad5446: Fix 24bit transfers We currently only write 16 bit in case where we should write 24 bit. The spi message length is calculated from the channel storage_size, but since the storage size is only 16 bit we end up with the wrong value for devices which have power down bits and thus a register with 24 bit. Since each store function knows how many bytes it has to write just use the spi_write function from there instead of going through the hassle of manually preparing a spi_message and keeping buffers in the state struct. Another advantage of this patch is that it will make implementing support for similar I2C based DACs much easier. Signed-off-by: Lars-Peter Clausen Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed