Skip to content

Commit 8aaf626

Browse files
committed
opp: Remove _dev_pm_opp_find_and_remove_table() wrapper
Remove the unnecessary wrapper and merge _dev_pm_opp_find_and_remove_table() with dev_pm_opp_remove_table(). Tested-by: Rajendra Nayak <rnayak@codeaurora.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent f3364e1 commit 8aaf626

4 files changed

Lines changed: 10 additions & 16 deletions

File tree

‎drivers/opp/core.c‎

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,14 @@ int dev_pm_opp_unregister_notifier(struct device *dev,
23952395
}
23962396
EXPORT_SYMBOL(dev_pm_opp_unregister_notifier);
23972397

2398-
void _dev_pm_opp_find_and_remove_table(struct device *dev)
2398+
/**
2399+
* dev_pm_opp_remove_table() - Free all OPPs associated with the device
2400+
* @dev: device pointer used to lookup OPP table.
2401+
*
2402+
* Free both OPPs created using static entries present in DT and the
2403+
* dynamically added entries.
2404+
*/
2405+
void dev_pm_opp_remove_table(struct device *dev)
23992406
{
24002407
struct opp_table *opp_table;
24012408

@@ -2420,16 +2427,4 @@ void _dev_pm_opp_find_and_remove_table(struct device *dev)
24202427
/* Drop reference taken while the OPP table was added */
24212428
dev_pm_opp_put_opp_table(opp_table);
24222429
}
2423-
2424-
/**
2425-
* dev_pm_opp_remove_table() - Free all OPPs associated with the device
2426-
* @dev: device pointer used to lookup OPP table.
2427-
*
2428-
* Free both OPPs created using static entries present in DT and the
2429-
* dynamically added entries.
2430-
*/
2431-
void dev_pm_opp_remove_table(struct device *dev)
2432-
{
2433-
_dev_pm_opp_find_and_remove_table(dev);
2434-
}
24352430
EXPORT_SYMBOL_GPL(dev_pm_opp_remove_table);

‎drivers/opp/cpu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void _dev_pm_opp_cpumask_remove_table(const struct cpumask *cpumask,
124124
continue;
125125
}
126126

127-
_dev_pm_opp_find_and_remove_table(cpu_dev);
127+
dev_pm_opp_remove_table(cpu_dev);
128128
}
129129
}
130130

‎drivers/opp/of.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
616616
*/
617617
void dev_pm_opp_of_remove_table(struct device *dev)
618618
{
619-
_dev_pm_opp_find_and_remove_table(dev);
619+
dev_pm_opp_remove_table(dev);
620620
}
621621
EXPORT_SYMBOL_GPL(dev_pm_opp_of_remove_table);
622622

‎drivers/opp/opp.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ void _get_opp_table_kref(struct opp_table *opp_table);
217217
int _get_opp_count(struct opp_table *opp_table);
218218
struct opp_table *_find_opp_table(struct device *dev);
219219
struct opp_device *_add_opp_dev(const struct device *dev, struct opp_table *opp_table);
220-
void _dev_pm_opp_find_and_remove_table(struct device *dev);
221220
struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table);
222221
void _opp_free(struct dev_pm_opp *opp);
223222
int _opp_compare_key(struct dev_pm_opp *opp1, struct dev_pm_opp *opp2);

0 commit comments

Comments
 (0)