Message ID | 1454000060-8407-1-git-send-email-Damien.Horsley@imgtec.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f1188b898ec5aa2e94da8fb998648a2738f4fb3b |
Headers | show |
On Thu, Jan 28, 2016 at 04:54:20PM +0000, Damien Horsley wrote: > + ret = clk_set_rate(pcm3168a->scki, freq); > + if (ret) > + return ret; > + > pcm3168a->sysclk = freq; Since the clock appears to be mandatory in this driver (good!) why are we even storing sysclk? Just remove it, the driver never actually used it anyway.
diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c index 44b268a..0c7248a 100644 --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c @@ -299,10 +299,15 @@ static int pcm3168a_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir) { struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(dai->codec); + int ret; if (freq > PCM1368A_MAX_SYSCLK) return -EINVAL; + ret = clk_set_rate(pcm3168a->scki, freq); + if (ret) + return ret; + pcm3168a->sysclk = freq; return 0;