15 Jul
2015
15 Jul
'15
1:49 p.m.
On Tue, Jul 14, 2015 at 08:23:39PM -0500, timothyc.howe@gmail.com wrote:
+static int cs4349_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
int source, unsigned int freq, int dir)
+{
- struct cs4349_private *cs4349 = snd_soc_codec_get_drvdata(codec);
- cs4349->mclk = freq;
- return 0;
+}
On a more detailed look I'm not seeing anywhere where mclk is referenced, it appears to be write only. Better to remove this function and the private data for it if it's not needed.
+#ifdef CONFIG_PM +static int cs4349_runtime_suspend(struct device *dev) +{
- struct cs4349_private *cs4349 = dev_get_drvdata(dev);
- struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev);
- int ret;
- ret = snd_soc_update_bits(rtd->codec, CS4349_MISC, PWR_DWN, 1);
- if (ret < 0)
return ret;
- regcache_cache_only(cs4349->regmap, true);
- regcache_sync(cs4349->regmap);
This doesn't make sense to me - we're syncing the register map right after we put the device into cache only mode. I think it's just a cut'n'paste thing?