mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00:00
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>
This commit is contained in:
parent
a500231da4
commit
7a748e4318
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user