From: Axel Lin Date: Fri, 27 May 2011 15:30:53 +0000 (+0800) Subject: ASoC: Remove redundant freq assignment for max98095->sysclk/max98088->sysclk X-Git-Tag: Ubuntu-5.10.0-12.13~22295^2~1005 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=74ab24af4fe165de5af01d0507250dd099f096b0;p=mirror_ubuntu-hirsute-kernel.git 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. Signed-off-by: Axel Lin Acked-by: Peter Hsiang Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index bb58bdb49853..93255ff48b4f 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1401,8 +1401,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).. diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index a6cc94e1750b..fe19677bf4b5 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c @@ -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)..