提交 6369fd41 编写于 作者: N NeilBrown 提交者: Kevin Hilman

ARM: OMAP: add RCU locking to omap2_set_init_voltage.

opp_find_freq_ceil and opp_get_voltage are documented as requiring
rcu_lock to be held.  So hold it.
Signed-off-by: NNeilBrown <neilb@suse.de>
Signed-off-by: NKevin Hilman <khilman@ti.com>
上级 d65b4e98
...@@ -174,14 +174,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, ...@@ -174,14 +174,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
freq = clk->rate; freq = clk->rate;
clk_put(clk); clk_put(clk);
rcu_read_lock();
opp = opp_find_freq_ceil(dev, &freq); opp = opp_find_freq_ceil(dev, &freq);
if (IS_ERR(opp)) { if (IS_ERR(opp)) {
rcu_read_unlock();
pr_err("%s: unable to find boot up OPP for vdd_%s\n", pr_err("%s: unable to find boot up OPP for vdd_%s\n",
__func__, vdd_name); __func__, vdd_name);
goto exit; goto exit;
} }
bootup_volt = opp_get_voltage(opp); bootup_volt = opp_get_voltage(opp);
rcu_read_unlock();
if (!bootup_volt) { if (!bootup_volt) {
pr_err("%s: unable to find voltage corresponding " pr_err("%s: unable to find voltage corresponding "
"to the bootup OPP for vdd_%s\n", __func__, vdd_name); "to the bootup OPP for vdd_%s\n", __func__, vdd_name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册