diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2015-11-03 23:13:57 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-11-05 22:50:48 +0100 |
commit | d7e53e35f9f54cdfa09a8456ae8e9874ec66bb36 (patch) | |
tree | 6ffae5c919377a2c3d871faf4900b7c999cee283 /drivers/cpufreq/s5pv210-cpufreq.c | |
parent | MAINTAINERS: update for intel P-state driver (diff) | |
download | linux-d7e53e35f9f54cdfa09a8456ae8e9874ec66bb36.tar.xz linux-d7e53e35f9f54cdfa09a8456ae8e9874ec66bb36.zip |
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>
Diffstat (limited to 'drivers/cpufreq/s5pv210-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/s5pv210-cpufreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c index 9e231f52150c..051a8a8224cd 100644 --- a/drivers/cpufreq/s5pv210-cpufreq.c +++ b/drivers/cpufreq/s5pv210-cpufreq.c @@ -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); } |