[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200511111912.3001-6-lukasz.luba@arm.com>
Date: Mon, 11 May 2020 12:19:02 +0100
From: Lukasz Luba <lukasz.luba@....com>
To: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
dri-devel@...ts.freedesktop.org, linux-omap@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-imx@....com
Cc: Dietmar.Eggemann@....com, cw00.choi@...sung.com,
b.zolnierkie@...sung.com, rjw@...ysocki.net, sudeep.holla@....com,
viresh.kumar@...aro.org, nm@...com, sboyd@...nel.org,
rui.zhang@...el.com, amit.kucheria@...durent.com,
daniel.lezcano@...aro.org, mingo@...hat.com, peterz@...radead.org,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
rostedt@...dmis.org, qperret@...gle.com, bsegall@...gle.com,
mgorman@...e.de, shawnguo@...nel.org, s.hauer@...gutronix.de,
festevam@...il.com, kernel@...gutronix.de, khilman@...nel.org,
agross@...nel.org, bjorn.andersson@...aro.org, robh@...nel.org,
matthias.bgg@...il.com, steven.price@....com,
tomeu.vizoso@...labora.com, alyssa.rosenzweig@...labora.com,
airlied@...ux.ie, daniel@...ll.ch, liviu.dudau@....com,
lorenzo.pieralisi@....com, lukasz.luba@....com,
patrick.bellasi@...bug.net, orjan.eide@....com,
rdunlap@...radead.org, mka@...omium.org
Subject: [PATCH v7 05/15] 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 <daniel.lezcano@...aro.org>
Signed-off-by: Lukasz Luba <lukasz.luba@....com>
---
include/linux/energy_model.h | 7 -------
kernel/power/energy_model.c | 25 -------------------------
2 files changed, 32 deletions(-)
diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h
index f5a88486d1c4..6b56ae6c6a89 100644
--- a/include/linux/energy_model.h
+++ b/include/linux/energy_model.h
@@ -77,8 +77,6 @@ struct em_data_callback {
struct em_perf_domain *em_cpu_get(int cpu);
struct em_perf_domain *em_pd_get(struct device *dev);
-int em_register_perf_domain(cpumask_t *span, unsigned int nr_states,
- struct em_data_callback *cb);
int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states,
struct em_data_callback *cb, cpumask_t *span);
void em_dev_unregister_perf_domain(struct device *dev);
@@ -180,11 +178,6 @@ static inline int em_pd_nr_perf_states(struct em_perf_domain *pd)
struct em_data_callback {};
#define EM_DATA_CB(_active_power_cb) { }
-static inline int em_register_perf_domain(cpumask_t *span,
- unsigned int nr_states, struct em_data_callback *cb)
-{
- return -EINVAL;
-}
static inline
int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states,
struct em_data_callback *cb, cpumask_t *span)
diff --git a/kernel/power/energy_model.c b/kernel/power/energy_model.c
index 9cc7f2973600..3c5c579ad2c2 100644
--- a/kernel/power/energy_model.c
+++ b/kernel/power/energy_model.c
@@ -322,31 +322,6 @@ int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states,
}
EXPORT_SYMBOL_GPL(em_dev_register_perf_domain);
-/**
- * em_register_perf_domain() - Register the Energy Model of a performance domain
- * @span : Mask of CPUs in the performance domain
- * @nr_states : Number of capacity states to register
- * @cb : Callback functions providing the data of the Energy Model
- *
- * Create Energy Model tables for a performance domain using the callbacks
- * defined in cb.
- *
- * If multiple clients register the same performance domain, all but the first
- * registration will be ignored.
- *
- * Return 0 on success
- */
-int em_register_perf_domain(cpumask_t *span, unsigned int nr_states,
- struct em_data_callback *cb)
-{
- struct device *cpu_dev;
-
- cpu_dev = get_cpu_device(cpumask_first(span));
-
- return em_dev_register_perf_domain(cpu_dev, nr_states, cb, span);
-}
-EXPORT_SYMBOL_GPL(em_register_perf_domain);
-
/**
* em_dev_unregister_perf_domain() - Unregister Energy Model (EM) for a device
* @dev : Device for which the EM is registered
--
2.17.1
Powered by blists - more mailing lists