summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sta32x.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-01 11:36:14 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-03 22:18:32 +0100
commit7a748e4318909e680b3900e3b97ea42a92724c68 (patch)
tree0769a57dd4077484e4bdb91fa52bfa14322407da /sound/soc/codecs/sta32x.c
parentASoC: soc-pcm: Allocate PCM operations dynamically to support multiple DAIs (diff)
downloadlinux-7a748e4318909e680b3900e3b97ea42a92724c68.tar.xz
linux-7a748e4318909e680b3900e3b97ea42a92724c68.zip
ASoC: sta32x: Optimize the array work to find rate_min and rate_max
For a given ir and fs, there is at most one possible match for the case mclk_ratios[ir][j].ratio * fs == freq. Thus we can break from the inner loop once a match is found. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/sta32x.c')
-rw-r--r--sound/soc/codecs/sta32x.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index fbd145091356..7db6fa515028 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -522,6 +522,7 @@ static int sta32x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
rate_min = fs;
if (fs > rate_max)
rate_max = fs;
+ break;
}
}
}