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:
parent
58ac1f6202
commit
d7e53e35f9
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue