Skip to contentSkip to conversation

ASoC: Remove redundant freq assignment for max98095->sysclk/max98088->sysclk

PATCH Applied Axel Lin 4 participants 4 messages May 27, 2011 – May 28, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: Remove redundant freq assignment for max98095->sysclk/max98088->sysclk

Current implementation set max98095->sysclk/max98088->sysclk to freq twice. Set it once is enough, this patch removes the first assignment in case we may set invalid clock frequency to max98095->sysclk/max98088->sysclk.

---
hi Peter,
I don't have this hardware handy. Can you help to test it? Thanks,
Axel

 sound/soc/codecs/max98088.c |    2 --
 sound/soc/codecs/max98095.c |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
sound/soc/codecs/max98088.c +0 -2
index 4173b67..ac65a2d 100644
@@ -1397,8 +1397,6 @@ static int max98088_dai_set_sysclk(struct snd_soc_dai *dai,
        if (freq == max98088->sysclk)
                return 0;
 
-       max98088->sysclk = freq; /* remember current sysclk */
-
        /* Setup clocks for slave mode, and using the PLL
         * PSCLK = 0x01 (when master clk is 10MHz to 20MHz)
         *         0x02 (when master clk is 20MHz to 30MHz)..
sound/soc/codecs/max98095.c +0 -2
index e1d282d..872a5fa 100644
@@ -1517,8 +1517,6 @@ static int max98095_dai_set_sysclk(struct snd_soc_dai *dai,
 	if (freq == max98095->sysclk)
 		return 0;
 
-	max98095->sysclk = freq; /* remember current sysclk */
-
 	/* Setup clocks for slave mode, and using the PLL
 	 * PSCLK = 0x01 (when master clk is 10MHz to 20MHz)
 	 *         0x02 (when master clk is 20MHz to 40MHz)..
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Axel Lin

Current implementation set max98095->sysclk/max98088->sysclk to freq twice. Set it once is enough, this patch removes the first assignment in case we may set invalid clock frequency to max98095->sysclk/max98088->sysclk.

---
hi Peter,
I don't have this hardware handy. Can you help to test it? Thanks,
Axel

Acked-by on v1 1/1
#2 lore raw
In reply to Axel Lin
Quoted 11 lines · Alex Lin

Current implementation set max98095->sysclk/max98088->sysclk to freq twice. Set it once is enough, this patch removes the first assignment in case we may set invalid clock frequency to max98095->sysclk/max98088->sysclk.

---
hi Peter,
I don't have this hardware handy. Can you help to test it? Thanks,
Axel

Applied
#3 lore raw
In reply to Axel Lin
Quoted 3 lines · Axel Lin

Current implementation set max98095->sysclk/max98088->sysclk to freq twice. Set it once is enough, this patch removes the first assignment in case we may set invalid clock frequency to max98095->sysclk/max98088->sysclk.

Applied, thanks.