Thread (8 messages) 8 messages, 3 authors, 2014-05-13

[PATCH 1/2] PM / OPP: Remove cpufreq wrapper dependency on internal data organization

From: viresh.kumar@linaro.org (Viresh Kumar)
Date: 2014-05-05 14:23:18
Also in: linux-omap, linux-pm, linux-samsung-soc, lkml

On 5 May 2014 19:03, Nishanth Menon [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
 int dev_pm_opp_init_cpufreq_table(struct device *dev,
                            struct cpufreq_frequency_table **table)
 {
-       struct device_opp *dev_opp;
        struct dev_pm_opp *opp;
-       struct cpufreq_frequency_table *freq_table;
-       int i = 0;
+       struct cpufreq_frequency_table *freq_table = NULL;
+       int i, max_opps, ret = 0;
+       unsigned long rate;

-       /* Pretend as if I am an updater */
-       mutex_lock(&dev_opp_list_lock);
What if opp is being added for some reason at the same time?
I hope we can surely see some awkward results, maybe some
NULL pointers invocations as well..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help