From a1cf97c2d43ae51f3de091d51adff6b70a5cd55c Mon Sep 17 00:00:00 2001 From: Wyes Karny Date: Mon, 19 Jun 2023 19:04:59 +0000 Subject: [PATCH] cpupower: Recognise amd-pstate active mode driver amd-pstate active mode driver name is "amd-pstate-epp". Use common prefix for string matching condition to recognise amd-pstate active mode driver. Reviewed-by: Gautham R. Shenoy Signed-off-by: Wyes Karny Reviewed-by: Mario Limonciello Tested-by: Perry Yuan Acked-by: Huang Rui Signed-off-by: Shuah Khan --- tools/power/cpupower/utils/helpers/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/power/cpupower/utils/helpers/misc.c b/tools/power/cpupower/utils/helpers/misc.c index 9547b29..0c56fc7 100644 --- a/tools/power/cpupower/utils/helpers/misc.c +++ b/tools/power/cpupower/utils/helpers/misc.c @@ -95,7 +95,7 @@ bool cpupower_amd_pstate_enabled(void) if (!driver) return ret; - if (!strcmp(driver, "amd-pstate")) + if (!strncmp(driver, "amd", 3)) ret = true; cpufreq_put_driver(driver); -- 2.7.4