ASoC: fix ak4104 register array access
authorDaniel Mack <daniel@caiaq.de>
Fri, 26 Feb 2010 06:36:54 +0000 (14:36 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 15:49:52 +0000 (08:49 -0700)
commitcd67f0abe5a9285051848da36379f1433d52e946
treea03c2fd7abf7f89dd65642b32c373747cf455eda
parentd2a4799777816e66e6776c073fe5b75b1a0161fb
ASoC: fix ak4104 register array access

commit e555317c083fda01f516d2153589e82514e20e70 upstream.

Don't touch the variable 'reg' to construct the value for the actual SPI
transport. This variable is again used to access the driver's register
cache, and so random memory is overwritten.
Compute the value in-place instead.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/soc/codecs/ak4104.c