Skip to content

Commit 07891f1

Browse files
lukaszluba-armrafaeljw
authored andcommitted
PM / EM: remove em_register_perf_domain
Remove old function em_register_perf_domain which is no longer needed. There is em_dev_register_perf_domain that covers old use cases and new as well. Acked-by: Daniel Lezcano <[email protected]> Acked-by: Quentin Perret <[email protected]> Signed-off-by: Lukasz Luba <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 1bc138c commit 07891f1

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

include/linux/energy_model.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ struct em_data_callback {
7878

7979
struct em_perf_domain *em_cpu_get(int cpu);
8080
struct em_perf_domain *em_pd_get(struct device *dev);
81-
int em_register_perf_domain(cpumask_t *span, unsigned int nr_states,
82-
struct em_data_callback *cb);
8381
int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states,
8482
struct em_data_callback *cb, cpumask_t *span);
8583
void em_dev_unregister_perf_domain(struct device *dev);
@@ -181,11 +179,6 @@ static inline int em_pd_nr_perf_states(struct em_perf_domain *pd)
181179
struct em_data_callback {};
182180
#define EM_DATA_CB(_active_power_cb) { }
183181

184-
static inline int em_register_perf_domain(cpumask_t *span,
185-
unsigned int nr_states, struct em_data_callback *cb)
186-
{
187-
return -EINVAL;
188-
}
189182
static inline
190183
int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states,
191184
struct em_data_callback *cb, cpumask_t *span)

kernel/power/energy_model.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -322,31 +322,6 @@ int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states,
322322
}
323323
EXPORT_SYMBOL_GPL(em_dev_register_perf_domain);
324324

325-
/**
326-
* em_register_perf_domain() - Register the Energy Model of a performance domain
327-
* @span : Mask of CPUs in the performance domain
328-
* @nr_states : Number of capacity states to register
329-
* @cb : Callback functions providing the data of the Energy Model
330-
*
331-
* Create Energy Model tables for a performance domain using the callbacks
332-
* defined in cb.
333-
*
334-
* If multiple clients register the same performance domain, all but the first
335-
* registration will be ignored.
336-
*
337-
* Return 0 on success
338-
*/
339-
int em_register_perf_domain(cpumask_t *span, unsigned int nr_states,
340-
struct em_data_callback *cb)
341-
{
342-
struct device *cpu_dev;
343-
344-
cpu_dev = get_cpu_device(cpumask_first(span));
345-
346-
return em_dev_register_perf_domain(cpu_dev, nr_states, cb, span);
347-
}
348-
EXPORT_SYMBOL_GPL(em_register_perf_domain);
349-
350325
/**
351326
* em_dev_unregister_perf_domain() - Unregister Energy Model (EM) for a device
352327
* @dev : Device for which the EM is registered

0 commit comments

Comments
 (0)