diff options
author | 2009-05-29 09:22:37 +0300 | |
---|---|---|
committer | 2009-05-29 11:02:48 +0100 | |
commit | 16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9 (patch) | |
tree | 68a444cf8a4cc09e4b2b06909f6e8826ca21a6f4 /sound | |
parent | ASoC: Initialise dev for the dummy S/PDIF DAI (diff) | |
download | linux-16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9.tar.gz linux-16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9.tar.bz2 linux-16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9.zip |
ASoC: TWL4030: Use reg_cache in twl4030_init_chip
Use the codec->reg_cache instead of the array directly
in twl4030_init_chip for setting the default values.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/twl4030.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 63ebd176fbe4..df474a5dd357 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -145,7 +145,6 @@ struct twl4030_priv { static inline unsigned int twl4030_read_reg_cache(struct snd_soc_codec *codec, unsigned int reg) { - u8 *cache = codec->reg_cache; if (reg >= TWL4030_CACHEREGNUM) return -EIO; @@ -204,6 +203,7 @@ static void twl4030_codec_enable(struct snd_soc_codec *codec, int enable) static void twl4030_init_chip(struct snd_soc_codec *codec) { + u8 *cache = codec->reg_cache; int i; /* clear CODECPDZ prior to setting register defaults */ @@ -211,7 +211,7 @@ static void twl4030_init_chip(struct snd_soc_codec *codec) /* set all audio section registers to reasonable defaults */ for (i = TWL4030_REG_OPTION; i <= TWL4030_REG_MISC_SET_2; i++) - twl4030_write(codec, i, twl4030_reg[i]); + twl4030_write(codec, i, cache[i]); } |