summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2022-03-21 10:57:25 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-13 16:26:17 +0200
commit75a3a99a5a9886af13be44e640cb415ebda80db2 (patch)
treec467d114250dd499eeb4f3bc9869d501bb2f30c0 /kernel/power
parentPM: EM: Use the new .get_cost() callback while registering EM (diff)
downloadlinux-75a3a99a5a9886af13be44e640cb415ebda80db2.tar.xz
linux-75a3a99a5a9886af13be44e640cb415ebda80db2.zip
PM: EM: Change the order of arguments in the .active_power() callback
The .active_power() callback passes the device pointer when it's called. Aligned with a convetion present in other subsystems and pass the 'dev' as a first argument. It looks more cleaner. Adjust all affected drivers which implement that API callback. Suggested-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/energy_model.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/energy_model.c b/kernel/power/energy_model.c
index 95a3b33001f6..babefc72085d 100644
--- a/kernel/power/energy_model.c
+++ b/kernel/power/energy_model.c
@@ -140,7 +140,7 @@ static int em_create_perf_table(struct device *dev, struct em_perf_domain *pd,
* lowest performance state of 'dev' above 'freq' and updates
* 'power' and 'freq' accordingly.
*/
- ret = cb->active_power(&power, &freq, dev);
+ ret = cb->active_power(dev, &power, &freq);
if (ret) {
dev_err(dev, "EM: invalid perf. state: %d\n",
ret);