aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2015-11-03 17:13:57 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-11-05 22:50:48 +0100
commitd7e53e35f9f54cdfa09a8456ae8e9874ec66bb36 (patch)
tree6ffae5c919377a2c3d871faf4900b7c999cee283 /drivers/cpufreq
parentMAINTAINERS: update for intel P-state driver (diff)
downloadlinux-dev-d7e53e35f9f54cdfa09a8456ae8e9874ec66bb36.tar.xz
linux-dev-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')
-rw-r--r--drivers/cpufreq/s5pv210-cpufreq.c4
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);
}