Skip to content

Commit 05ce719

Browse files
committed
PM: domains: Drop the unused pm_genpd_opp_to_performance_state()
Since commit 7c41cdc ("OPP: Simplify the over-designed pstate <-> level dance"), there is no longer any users of the pm_genpd_opp_to_performance_state() API. Let's therefore drop it and its corresponding ->opp_to_performance_state() callback, which also no longer has any users. Signed-off-by: Ulf Hansson <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3b2714c commit 05ce719

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

drivers/base/power/domain.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3042,38 +3042,6 @@ int of_genpd_parse_idle_states(struct device_node *dn,
30423042
}
30433043
EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states);
30443044

3045-
/**
3046-
* pm_genpd_opp_to_performance_state - Gets performance state of the genpd from its OPP node.
3047-
*
3048-
* @genpd_dev: Genpd's device for which the performance-state needs to be found.
3049-
* @opp: struct dev_pm_opp of the OPP for which we need to find performance
3050-
* state.
3051-
*
3052-
* Returns performance state encoded in the OPP of the genpd. This calls
3053-
* platform specific genpd->opp_to_performance_state() callback to translate
3054-
* power domain OPP to performance state.
3055-
*
3056-
* Returns performance state on success and 0 on failure.
3057-
*/
3058-
unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev,
3059-
struct dev_pm_opp *opp)
3060-
{
3061-
struct generic_pm_domain *genpd = NULL;
3062-
int state;
3063-
3064-
genpd = container_of(genpd_dev, struct generic_pm_domain, dev);
3065-
3066-
if (unlikely(!genpd->opp_to_performance_state))
3067-
return 0;
3068-
3069-
genpd_lock(genpd);
3070-
state = genpd->opp_to_performance_state(genpd, opp);
3071-
genpd_unlock(genpd);
3072-
3073-
return state;
3074-
}
3075-
EXPORT_SYMBOL_GPL(pm_genpd_opp_to_performance_state);
3076-
30773045
static int __init genpd_bus_init(void)
30783046
{
30793047
return bus_register(&genpd_bus_type);

include/linux/pm_domain.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ struct genpd_power_state {
118118
};
119119

120120
struct genpd_lock_ops;
121-
struct dev_pm_opp;
122121
struct opp_table;
123122

124123
struct generic_pm_domain {
@@ -146,8 +145,6 @@ struct generic_pm_domain {
146145
int (*power_on)(struct generic_pm_domain *domain);
147146
struct raw_notifier_head power_notifiers; /* Power on/off notifiers */
148147
struct opp_table *opp_table; /* OPP table of the genpd */
149-
unsigned int (*opp_to_performance_state)(struct generic_pm_domain *genpd,
150-
struct dev_pm_opp *opp);
151148
int (*set_performance_state)(struct generic_pm_domain *genpd,
152149
unsigned int state);
153150
struct gpd_dev_ops dev_ops;
@@ -348,8 +345,6 @@ int of_genpd_remove_subdomain(struct of_phandle_args *parent_spec,
348345
struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
349346
int of_genpd_parse_idle_states(struct device_node *dn,
350347
struct genpd_power_state **states, int *n);
351-
unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev,
352-
struct dev_pm_opp *opp);
353348

354349
int genpd_dev_pm_attach(struct device *dev);
355350
struct device *genpd_dev_pm_attach_by_id(struct device *dev,
@@ -395,13 +390,6 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn,
395390
return -ENODEV;
396391
}
397392

398-
static inline unsigned int
399-
pm_genpd_opp_to_performance_state(struct device *genpd_dev,
400-
struct dev_pm_opp *opp)
401-
{
402-
return 0;
403-
}
404-
405393
static inline int genpd_dev_pm_attach(struct device *dev)
406394
{
407395
return 0;

0 commit comments

Comments
 (0)