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 коммит произвёл Rafael J. Wysocki
Родитель 58ac1f6202
Коммит d7e53e35f9
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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);
}