Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: cs4271: Fix a typo in the CS4171_NR_RATIOS

This should be CS4271_NR_RATIOS.
Fix it and use it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20190724060023.31302-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Christophe JAILLET and committed by
Mark Brown
0c03e37a 22581e7c

+3 -3
+3 -3
sound/soc/codecs/cs4271.c
··· 334 334 {0, CS4271_MODE1_MODE_4X, 256, CS4271_MODE1_DIV_2}, 335 335 }; 336 336 337 - #define CS4171_NR_RATIOS ARRAY_SIZE(cs4271_clk_tab) 337 + #define CS4271_NR_RATIOS ARRAY_SIZE(cs4271_clk_tab) 338 338 339 339 static int cs4271_hw_params(struct snd_pcm_substream *substream, 340 340 struct snd_pcm_hw_params *params, ··· 383 383 val = CS4271_MODE1_MODE_4X; 384 384 385 385 ratio = cs4271->mclk / cs4271->rate; 386 - for (i = 0; i < CS4171_NR_RATIOS; i++) 386 + for (i = 0; i < CS4271_NR_RATIOS; i++) 387 387 if ((cs4271_clk_tab[i].master == cs4271->master) && 388 388 (cs4271_clk_tab[i].speed_mode == val) && 389 389 (cs4271_clk_tab[i].ratio == ratio)) 390 390 break; 391 391 392 - if (i == CS4171_NR_RATIOS) { 392 + if (i == CS4271_NR_RATIOS) { 393 393 dev_err(component->dev, "Invalid sample rate\n"); 394 394 return -EINVAL; 395 395 }