aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/opp/core.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-09-13 13:14:36 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2018-09-19 14:56:45 -0700
commit2a4eb7358aba6beff7fa23f028c733310756e525 (patch)
treeb3d55773ffb03a9ee3a0d01d46f789f44bf5babb /drivers/opp/core.c
parentcpufreq: mvebu: Remove OPPs using dev_pm_opp_remove() (diff)
downloadlinux-dev-2a4eb7358aba6beff7fa23f028c733310756e525.tar.xz
linux-dev-2a4eb7358aba6beff7fa23f028c733310756e525.zip
OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table()
Only one platform was depending on this feature and it is already updated now. Stop removing dynamic OPPs from _dev_pm_opp_remove_table(). This simplifies lot of paths and removes unnecessary parameters. Tested-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/core.c')
-rw-r--r--drivers/opp/core.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index b555121b878b..2319ad4a0177 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -1759,14 +1759,10 @@ int dev_pm_opp_unregister_notifier(struct device *dev,
EXPORT_SYMBOL(dev_pm_opp_unregister_notifier);
/*
- * Free OPPs either created using static entries present in DT or even the
- * dynamically added entries based on remove_all param.
+ * Free OPPs either created using static entries present in DT.
*/
-void _dev_pm_opp_remove_table(struct opp_table *opp_table, struct device *dev,
- bool remove_all)
+void _dev_pm_opp_remove_table(struct opp_table *opp_table, struct device *dev)
{
- struct dev_pm_opp *opp, *tmp;
-
/* Protect dev_list */
mutex_lock(&opp_table->lock);
@@ -1775,12 +1771,6 @@ void _dev_pm_opp_remove_table(struct opp_table *opp_table, struct device *dev,
/* Free static OPPs */
_put_opp_list_kref(opp_table);
- /* Free dynamic OPPs */
- list_for_each_entry_safe(opp, tmp, &opp_table->opp_list, node) {
- if (remove_all)
- dev_pm_opp_put(opp);
- }
-
/*
* The OPP table is getting removed, drop the performance state
* constraints.
@@ -1795,7 +1785,7 @@ void _dev_pm_opp_remove_table(struct opp_table *opp_table, struct device *dev,
mutex_unlock(&opp_table->lock);
}
-void _dev_pm_opp_find_and_remove_table(struct device *dev, bool remove_all)
+void _dev_pm_opp_find_and_remove_table(struct device *dev)
{
struct opp_table *opp_table;
@@ -1812,7 +1802,7 @@ void _dev_pm_opp_find_and_remove_table(struct device *dev, bool remove_all)
return;
}
- _dev_pm_opp_remove_table(opp_table, dev, remove_all);
+ _dev_pm_opp_remove_table(opp_table, dev);
dev_pm_opp_put_opp_table(opp_table);
}
@@ -1826,6 +1816,6 @@ void _dev_pm_opp_find_and_remove_table(struct device *dev, bool remove_all)
*/
void dev_pm_opp_remove_table(struct device *dev)
{
- _dev_pm_opp_find_and_remove_table(dev, true);
+ _dev_pm_opp_find_and_remove_table(dev);
}
EXPORT_SYMBOL_GPL(dev_pm_opp_remove_table);