cpufreq: s5pv210-cpufreq: fix wrong do_div() usage

It is wrong to use do_div() with 32-bit dividends (unsigned long is
32 bits on 32-bit architectures).

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Nicolas Pitre 2015-11-03 17:13:57 -05:00 committed by Rafael J. Wysocki
parent 58ac1f6202
commit d7e53e35f9
1 changed files with 2 additions and 2 deletions

View File

@ -212,11 +212,11 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq)
/* Find current DRAM frequency */ /* Find current DRAM frequency */
tmp = s5pv210_dram_conf[ch].freq; tmp = s5pv210_dram_conf[ch].freq;
do_div(tmp, freq); tmp /= freq;
tmp1 = s5pv210_dram_conf[ch].refresh; tmp1 = s5pv210_dram_conf[ch].refresh;
do_div(tmp1, tmp); tmp1 /= tmp;
__raw_writel(tmp1, reg); __raw_writel(tmp1, reg);
} }