drivers: power: opp: remove all OPPs registered from DT
authorLukasz Luba <l.luba@partner.samsung.com>
Tue, 29 Jan 2019 15:16:05 +0000 (16:16 +0100)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:58:24 +0000 (14:58 +0900)
commitfe7d78942bd5e8590ac99bdc8168217a13c0d92d
tree5ebf95cd26360a372dcdc47ea7c5de69746aeb72
parent923c3cb4bbf812b630ef41130ec6366384058fc7
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] [<c01117b0>] (unwind_backtrace) from [<c010cf10>] (show_stack+0x20/0x24)
[   18.152927] [<c010cf10>] (show_stack) from [<c0c37310>] (dump_stack+0x7c/0x9c)
[   18.152938] [<c0c37310>] (dump_stack) from [<c012256c>] (__warn+0xe4/0x110)
[   18.152946] [<c012256c>] (__warn) from [<c01225c8>] (warn_slowpath_null+0x30/0x38)
[   18.152953] [<c01225c8>] (warn_slowpath_null) from [<c05755c4>] (dev_pm_opp_put_regulators+0xa8/0xb8)
[   18.152963] [<c05755c4>] (dev_pm_opp_put_regulators) from [<c0893e44>] (cpufreq_exit+0xa4/0xb0)
[   18.152971] [<c0893e44>] (cpufreq_exit) from [<c088f754>] (cpufreq_offline+0x118/0x238)
[   18.152977] [<c088f754>] (cpufreq_offline) from [<c088f930>] (cpuhp_cpufreq_offline+0x18/0x20)
[   18.152984] [<c088f930>] (cpuhp_cpufreq_offline) from [<c0122d18>] (cpuhp_invoke_callback+0xdc/0x964)
[   18.152992] [<c0122d18>] (cpuhp_invoke_callback) from [<c01245b8>] (cpuhp_thread_fun+0x114/0x2a4)
[   18.153002] [<c01245b8>] (cpuhp_thread_fun) from [<c0147298>] (smpboot_thread_fn+0x1cc/0x2f0)
[   18.153010] [<c0147298>] (smpboot_thread_fn) from [<c0142bb8>] (kthread+0x130/0x168)
[   18.153018] [<c0142bb8>] (kthread) from [<c0108e08>] (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 <l.luba@partner.samsung.com>
drivers/base/power/opp/of.c