summaryrefslogtreecommitdiff
path: root/drivers/powercap/dtpm_cpu.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-12-07 04:03:50 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-12-07 04:03:50 +0300
commit0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7 (patch)
tree44d6ba1879278a5a1b58178e9b0f799427e52e0e /drivers/powercap/dtpm_cpu.c
parentb2f557a21bc8fffdcd65794eda8a854e024999f3 (diff)
parent33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff)
downloadlinux-0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7.tar.xz
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'drivers/powercap/dtpm_cpu.c')
-rw-r--r--drivers/powercap/dtpm_cpu.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/powercap/dtpm_cpu.c b/drivers/powercap/dtpm_cpu.c
index 2ff7717530bf..8a2f18fa3faf 100644
--- a/drivers/powercap/dtpm_cpu.c
+++ b/drivers/powercap/dtpm_cpu.c
@@ -24,7 +24,6 @@
#include <linux/of.h>
#include <linux/pm_qos.h>
#include <linux/slab.h>
-#include <linux/units.h>
struct dtpm_cpu {
struct dtpm dtpm;
@@ -104,8 +103,7 @@ static u64 get_pd_power_uw(struct dtpm *dtpm)
if (pd->table[i].frequency < freq)
continue;
- return scale_pd_power_uw(pd_mask, pd->table[i].power *
- MICROWATT_PER_MILLIWATT);
+ return scale_pd_power_uw(pd_mask, pd->table[i].power);
}
return 0;
@@ -122,11 +120,9 @@ static int update_pd_power_uw(struct dtpm *dtpm)
nr_cpus = cpumask_weight(&cpus);
dtpm->power_min = em->table[0].power;
- dtpm->power_min *= MICROWATT_PER_MILLIWATT;
dtpm->power_min *= nr_cpus;
dtpm->power_max = em->table[em->nr_perf_states - 1].power;
- dtpm->power_max *= MICROWATT_PER_MILLIWATT;
dtpm->power_max *= nr_cpus;
return 0;