OMAP3: allow to disable UART4
[pandora-kernel.git] / arch / arm / mach-omap2 / pm.c
index fa0c30a..8407dab 100644 (file)
@@ -154,7 +154,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
        }
 
        voltdm = voltdm_lookup(vdd_name);
-       if (IS_ERR(voltdm)) {
+       if (!voltdm) {
                pr_err("%s: unable to get vdd pointer for vdd_%s\n",
                        __func__, vdd_name);
                goto exit;
@@ -169,14 +169,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
        freq = clk->rate;
        clk_put(clk);
 
+       rcu_read_lock();
        opp = opp_find_freq_ceil(dev, &freq);
        if (IS_ERR(opp)) {
+               rcu_read_unlock();
                pr_err("%s: unable to find boot up OPP for vdd_%s\n",
                        __func__, vdd_name);
                goto exit;
        }
 
        bootup_volt = opp_get_voltage(opp);
+       rcu_read_unlock();
        if (!bootup_volt) {
                pr_err("%s: unable to find voltage corresponding "
                        "to the bootup OPP for vdd_%s\n", __func__, vdd_name);