diff options
author | Mark Brown <broonie@kernel.org> | 2015-01-07 17:30:17 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-07 17:30:17 +0000 |
commit | 1285c3fefaddedf5358f52cfde3c2b64d8086a04 (patch) | |
tree | 361f556d6b400e8cb6d16738142db2f69f63ef2f /drivers/cpufreq/cpufreq-dt.c | |
parent | 6b038c8d2b99b552f0b025c8a134f8a3c417a3e7 (diff) | |
parent | b1940cd21c0f4abdce101253e860feff547291b0 (diff) |
Merge tag 'v3.19-rc3' into spi-sh-msiof
Linux 3.19-rc3
Diffstat (limited to 'drivers/cpufreq/cpufreq-dt.c')
-rw-r--r-- | drivers/cpufreq/cpufreq-dt.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index f56147a1daed..fde97d6e31d6 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -211,6 +211,17 @@ static int cpufreq_init(struct cpufreq_policy *policy) /* OPPs might be populated at runtime, don't check for error here */ of_init_opp_table(cpu_dev); + /* + * But we need OPP table to function so if it is not there let's + * give platform code chance to provide it for us. + */ + ret = dev_pm_opp_get_opp_count(cpu_dev); + if (ret <= 0) { + pr_debug("OPP table is not ready, deferring probe\n"); + ret = -EPROBE_DEFER; + goto out_free_opp; + } + priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) { ret = -ENOMEM; |