summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_ssi.c
diff options
context:
space:
mode:
authorTimur Tabi <timur@tabi.org>2014-06-13 07:42:40 -0500
committerNitin Garg <nitin.garg@freescale.com>2015-01-15 21:16:55 -0600
commitce0e7afcaebde745e0c7cc647ee15fe40c6326bc (patch)
tree128d10f3de3b2f8b9207e19b4e4fbc88e23f57eb /sound/soc/fsl/fsl_ssi.c
parente3f58ce04bd70ef1d105660bac92df7fe3b107e9 (diff)
ASoC: fsl-ssi: fix do_div build warning in fsl_ssi_set_bclk()
do_div() requires that the first parameter is a 64-bit integer, which but clkrate was defined as an unsigned long. This caused the following warnings: CC sound/soc/fsl/fsl_ssi.o sound/soc/fsl/fsl_ssi.c: In function 'fsl_ssi_set_bclk': sound/soc/fsl/fsl_ssi.c:593:3: warning: comparison of distinct pointer types lacks a cast sound/soc/fsl/fsl_ssi.c:593:3: warning: right shift count >= width of type sound/soc/fsl/fsl_ssi.c:593:3: warning: passing argument 1 of '__div64_32' from incompatible pointer type include/asm-generic/div64.h:35:17: note: expected 'uint64_t *' but argument is of type 'long unsigned int *' Signed-off-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit acf2c60a60b3d6d7080854b9483f37d99ded9b23) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r--sound/soc/fsl/fsl_ssi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 9bfef55d77d1..3043d576856b 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -590,8 +590,8 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
else
clkrate = clk_round_rate(ssi_private->baudclk, tmprate);
- do_div(clkrate, factor);
- afreq = (u32)clkrate / (i + 1);
+ clkrate /= factor;
+ afreq = clkrate / (i + 1);
if (freq == afreq)
sub = 0;