author: Lukasz Luba <lukasz.luba@arm.com> 2020-05-27 10:58:49 +0100
committer: Rafael J. Wysocki <rafael.j.wysocki@intel.com> 2020-06-24 17:14:07 +0200
commit: d0351cc3b0f57214d157e4d589564730af2aedae
parent: 7d9895c7fbfc9c70afce7029b7de0f3f974adb88
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 7 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index 9a5873591a40..e273f419a4bf 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -1216,9 +1216,8 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_of_node);
* calculation failed because of missing parameters, 0 otherwise.
*/
static int __maybe_unused _get_cpu_power(unsigned long *mW, unsigned long *kHz,
- int cpu)
+ struct device *cpu_dev)
{
- struct device *cpu_dev;
struct dev_pm_opp *opp;
struct device_node *np;
unsigned long mV, Hz;
@@ -1226,10 +1225,6 @@ static int __maybe_unused _get_cpu_power(unsigned long *mW, unsigned long *kHz,
u64 tmp;
int ret;
- cpu_dev = get_cpu_device(cpu);
- if (!cpu_dev)
- return -ENODEV;
-
np = of_node_get(cpu_dev->of_node);
if (!np)
return -EINVAL;
@@ -1297,6 +1292,6 @@ void dev_pm_opp_of_register_em(struct cpumask *cpus)
if (ret || !cap)
return;
- em_register_perf_domain(cpus, nr_opp, &em_cb);
+ em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, cpus);
}
EXPORT_SYMBOL_GPL(dev_pm_opp_of_register_em);