Commit d7e53e35 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Rafael J. Wysocki

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: default avatarNicolas Pitre <nico@linaro.org>
Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 58ac1f62
......@@ -212,11 +212,11 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq)
/* Find current DRAM frequency */
tmp = s5pv210_dram_conf[ch].freq;
do_div(tmp, freq);
tmp /= freq;
tmp1 = s5pv210_dram_conf[ch].refresh;
do_div(tmp1, tmp);
tmp1 /= tmp;
__raw_writel(tmp1, reg);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment