summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/exynos5440-cpufreq.c
diff options
context:
space:
mode:
authorAmit Daniel Kachhap <amit.daniel@samsung.com>2013-04-22 00:24:37 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-22 00:24:37 +0200
commit70eb0855b2f8fcf61f9f47626b9fa70e7b45ab06 (patch)
treed9575a15b953827d0b01dde943c051ecde938ab3 /drivers/cpufreq/exynos5440-cpufreq.c
parentc77896693da9ad75bd999fd86dd81a3da747e267 (diff)
downloadlinux-70eb0855b2f8fcf61f9f47626b9fa70e7b45ab06.tar.bz2
cpufreq: exynos5440: Protect OPP search calls with RCU lock
As per the OPP library documentation(Documentation/power/opp.txt) all OPP find/get calls should be protected by RCU locks. Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/exynos5440-cpufreq.c')
-rw-r--r--drivers/cpufreq/exynos5440-cpufreq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c
index ead7ed43e238..0c74018eda47 100644
--- a/drivers/cpufreq/exynos5440-cpufreq.c
+++ b/drivers/cpufreq/exynos5440-cpufreq.c
@@ -120,11 +120,13 @@ static int init_div_table(void)
int i = 0;
struct opp *opp;
+ rcu_read_lock();
for (i = 0; freq_tbl[i].frequency != CPUFREQ_TABLE_END; i++) {
opp = opp_find_freq_exact(dvfs_info->dev,
freq_tbl[i].frequency * 1000, true);
if (IS_ERR(opp)) {
+ rcu_read_unlock();
dev_err(dvfs_info->dev,
"failed to find valid OPP for %u KHZ\n",
freq_tbl[i].frequency);
@@ -159,6 +161,7 @@ static int init_div_table(void)
__raw_writel(tmp, dvfs_info->base + XMU_PMU_P0_7 + 4 * i);
}
+ rcu_read_unlock();
return 0;
}