From: Gabor Juhos Date: Wed, 28 Aug 2013 08:41:43 +0000 (+0200) Subject: MIPS: ath79: Use local ref clock rate in ar934x_get_pll_freq X-Git-Tag: v3.12-rc1~21^2~29 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=837f036c8ab201965b9fb0f6b743a415f555493f;p=linux-2.6-block.git MIPS: ath79: Use local ref clock rate in ar934x_get_pll_freq The reference clock rate is passed in the first argument of the function. Use that instead of the rate of the global ath79_ref_clk variable. Signed-off-by: Gabor Juhos Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5779/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c index 733017b3dfe7..4378d63bc3ed 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c @@ -174,12 +174,12 @@ static u32 __init ar934x_get_pll_freq(u32 ref, u32 ref_div, u32 nint, u32 nfrac, u64 t; u32 ret; - t = ath79_ref_clk.rate; + t = ref; t *= nint; do_div(t, ref_div); ret = t; - t = ath79_ref_clk.rate; + t = ref; t *= nfrac; do_div(t, ref_div * frac); ret += t;