Title: [9782] trunk/sound/soc/codecs: ASoC: SSM2602/4: convert to snd_soc_cache_sync
- Revision
- 9782
- Author
- vapier
- Date
- 2011-03-27 18:22:39 -0400 (Sun, 27 Mar 2011)
Log Message
ASoC: SSM2602/4: convert to snd_soc_cache_sync
Modified Paths
Diff
Modified: trunk/sound/soc/codecs/ssm2602.c (9781 => 9782)
--- trunk/sound/soc/codecs/ssm2602.c 2011-03-27 09:24:18 UTC (rev 9781)
+++ trunk/sound/soc/codecs/ssm2602.c 2011-03-27 22:22:39 UTC (rev 9782)
@@ -437,13 +437,8 @@
static int ssm2602_resume(struct snd_soc_codec *codec)
{
- int i;
- u16 *cache = codec->reg_cache;
+ snd_soc_cache_sync(codec);
- /* Sync reg_cache with the hardware */
- for (i = 0; i < ARRAY_SIZE(ssm2602_reg); i++)
- snd_soc_write(codec, i, cache[i]);
-
ssm2602_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
Modified: trunk/sound/soc/codecs/ssm2604.c (9781 => 9782)
--- trunk/sound/soc/codecs/ssm2604.c 2011-03-27 09:24:18 UTC (rev 9781)
+++ trunk/sound/soc/codecs/ssm2604.c 2011-03-27 22:22:39 UTC (rev 9782)
@@ -378,18 +378,15 @@
ssm2604->pwr_state = snd_soc_read(codec, SSM2604_PWR);
ssm2604_set_bias_level(codec, SND_SOC_BIAS_OFF);
+
return 0;
}
static int ssm2604_resume(struct snd_soc_codec *codec)
{
struct ssm2604_priv *ssm2604 = snd_soc_codec_get_drvdata(codec);
- int i;
- u16 *cache = codec->reg_cache;
- /* Sync reg_cache with the hardware */
- for (i = 0; i < ARRAY_SIZE(ssm2604_reg); i++)
- snd_soc_write(codec, i, cache[i]);
+ snd_soc_cache_sync(codec);
ssm2604_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
snd_soc_write(codec, SSM2604_PWR, ssm2604->pwr_state);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits