Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: lm49453: Remove fs_rate from struct lm49453_priv
@ 2015-06-25  9:01 Axel Lin
  2015-07-07 13:57 ` Applied "ASoC: lm49453: Remove fs_rate from struct lm49453_priv" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-06-25  9:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Vishwas A Deshpande, M R Swami Reddy, alsa-devel, Liam Girdwood

fs_rate is only used in lm49453_hw_params() so don't need to store it in
private data.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/lm49453.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index 6600aa0..5b4086d 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -188,7 +188,6 @@ static struct reg_default lm49453_reg_defs[] = {
 /* codec private data */
 struct lm49453_priv {
 	struct regmap *regmap;
-	int fs_rate;
 };
 
 /* capture path controls */
@@ -1112,13 +1111,10 @@ static int lm49453_hw_params(struct snd_pcm_substream *substream,
 			     struct snd_soc_dai *dai)
 {
 	struct snd_soc_codec *codec = dai->codec;
-	struct lm49453_priv *lm49453 = snd_soc_codec_get_drvdata(codec);
 	u16 clk_div = 0;
 
-	lm49453->fs_rate = params_rate(params);
-
 	/* Setting DAC clock dividers based on substream sample rate. */
-	switch (lm49453->fs_rate) {
+	switch (params_rate(params)) {
 	case 8000:
 	case 16000:
 	case 32000:
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-07 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25  9:01 [PATCH] ASoC: lm49453: Remove fs_rate from struct lm49453_priv Axel Lin
2015-07-07 13:57 ` Applied "ASoC: lm49453: Remove fs_rate from struct lm49453_priv" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox