提交 d7e53e35 编写于 作者: N Nicolas Pitre 提交者: 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: NNicolas Pitre <nico@linaro.org>
Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册