From: Lukasz Luba Date: Tue, 29 Jan 2019 15:16:05 +0000 (+0100) Subject: drivers: power: opp: remove all OPPs registered from DT X-Git-Tag: submit/tizen/20190329.020226~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe7d78942bd5e8590ac99bdc8168217a13c0d92d;p=platform%2Fkernel%2Flinux-exynos.git drivers: power: opp: remove all OPPs registered from DT Patch solves issue with OPPs registered from DT and not removed during suspend. In suspend there was a warning: [ 18.152874] ------------[ cut here ]------------ [ 18.152885] WARNING: CPU: 7 PID: 43 at drivers/base/power/opp/core.c:1367 dev_pm_opp_put_regulators+0xa8/0xb8 [ 18.152889] Modules linked in: [ 18.152898] CPU: 7 PID: 43 Comm: cpuhp/7 Not tainted 4.14.85-00448-g64a9f12-dirty #6 [ 18.152902] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 18.152917] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [ 18.152927] [] (show_stack) from [] (dump_stack+0x7c/0x9c) [ 18.152938] [] (dump_stack) from [] (__warn+0xe4/0x110) [ 18.152946] [] (__warn) from [] (warn_slowpath_null+0x30/0x38) [ 18.152953] [] (warn_slowpath_null) from [] (dev_pm_opp_put_regulators+0xa8/0xb8) [ 18.152963] [] (dev_pm_opp_put_regulators) from [] (cpufreq_exit+0xa4/0xb0) [ 18.152971] [] (cpufreq_exit) from [] (cpufreq_offline+0x118/0x238) [ 18.152977] [] (cpufreq_offline) from [] (cpuhp_cpufreq_offline+0x18/0x20) [ 18.152984] [] (cpuhp_cpufreq_offline) from [] (cpuhp_invoke_callback+0xdc/0x964) [ 18.152992] [] (cpuhp_invoke_callback) from [] (cpuhp_thread_fun+0x114/0x2a4) [ 18.153002] [] (cpuhp_thread_fun) from [] (smpboot_thread_fn+0x1cc/0x2f0) [ 18.153010] [] (smpboot_thread_fn) from [] (kthread+0x130/0x168) [ 18.153018] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 18.153023] ---[ end trace a7d94f69fabccd7c ]--- This fix introduces removing all OPPs and is similar to what is present in current mainline. Change-Id: I1abb9c5c887721163c24221ddcac90c35bdf8d67 Signed-off-by: Lukasz Luba --- diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c index 87509cb69f79..386f71edf933 100644 --- a/drivers/base/power/opp/of.c +++ b/drivers/base/power/opp/of.c @@ -244,7 +244,7 @@ free_microvolt: */ void dev_pm_opp_of_remove_table(struct device *dev) { - _dev_pm_opp_find_and_remove_table(dev, false); + _dev_pm_opp_find_and_remove_table(dev, true); } EXPORT_SYMBOL_GPL(dev_pm_opp_of_remove_table);