[Powertop] [PATCH] fix cpuidle state name parsing

Rajagopal Venkat <rajagopal.venkat at linaro.org> Sat, 23 Jun 2012 00:08:46 +0530
Newsgroups dev.linux.lists.powertop
Message-ID <[email protected]>
parse cpuidle C state based on sysfs file entry(stateX)
instead of state name/description

Signed-off-by: Rajagopal Venkat <rajagopal.venkat(a)linaro.org>
---
 src/cpu/abstract_cpu.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
index cd4eba0..72969fc 100644
--- a/src/cpu/abstract_cpu.cpp
+++ b/src/cpu/abstract_cpu.cpp
@@ -147,7 +147,7 @@ void abstract_cpu::insert_cstate(const char *linux_name, const char *human_name,
 	strcpy(state->linux_name, linux_name);
 	strcpy(state->human_name, human_name);
 
-	c = human_name;
+	c = linux_name;
 	while (*c) {
 		if (strcmp(linux_name, "active")==0) {
 			state->line_level = LEVEL_C0;
-- 
1.7.9.5