aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_sai.c
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2013-12-20 03:41:02 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:57:37 -0400
commit38e3a5f73123dbad62a31fef3902a8774253e04f (patch)
treeb0aa3494534adc87d16605a41a06a347d8dc50a3 /sound/soc/fsl/fsl_sai.c
parent73c2ff7da6d5abb54f72fa83a4d0dd3687d32e81 (diff)
ASoC: fsl_sai: Drop useless channels check in hw_params()
SAi only supports two data channels on hardware level and the driver also does register the min->1 and max->2, so no need to check channels. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit d22e28cce80a93578787d273bf1fa26a2be2636b)
Diffstat (limited to 'sound/soc/fsl/fsl_sai.c')
-rw-r--r--sound/soc/fsl/fsl_sai.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index e68102e63521..8450bff6fb13 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -278,10 +278,7 @@ static int fsl_sai_hw_params(struct snd_pcm_substream *substream,
278 val_cr5 |= FSL_SAI_CR5_FBT(0); 278 val_cr5 |= FSL_SAI_CR5_FBT(0);
279 279
280 val_cr4 |= FSL_SAI_CR4_FRSZ(channels); 280 val_cr4 |= FSL_SAI_CR4_FRSZ(channels);
281 if (channels == 2 || channels == 1) 281 val_mr = ~0UL - ((1 << channels) - 1);
282 val_mr = ~0UL - ((1 << channels) - 1);
283 else
284 return -EINVAL;
285 282
286 sai_writel(sai, val_cr4, sai->base + reg_cr4); 283 sai_writel(sai, val_cr4, sai->base + reg_cr4);
287 sai_writel(sai, val_cr5, sai->base + reg_cr5); 284 sai_writel(sai, val_cr5, sai->base + reg_cr5);