From patchwork Fri Jun 22 18:38:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: rajagopal.venkat@linaro.org X-Patchwork-Id: 9583 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 085E223E37 for ; Fri, 22 Jun 2012 18:39:28 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id BF20AA18484 for ; Fri, 22 Jun 2012 18:39:27 +0000 (UTC) Received: by ggnf1 with SMTP id f1so1947440ggn.11 for ; Fri, 22 Jun 2012 11:39:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=Xv55YkkEZlI9O9Dp6NMTSk+S5E636a/pRxJuLOn6tB8=; b=mrzxpRmbQ9Y6vfaQmzg+W12FOCJJc7to3scSRgSnSkXEvx/Elk/DeqvR914m3bG+ib y2wqlOJ48lxJNvPb+hIJ0U7wt+7e14mNdrjKOXOoYNCyY+4P3iN49Yyf4IxuMd32pxbD UPJWsTkEZoNh/yupzXzZdT6ViG5kDQJwpYBGJ1n2mgcrtnTX1eSvgeJyUWjya6LqUsOX S5Fm4RX++gPRH1QxBMTwyC/nLJksV3NYEnWcVwH8IgygXFPjX/bH8fBJ7AAa+U/ue+KC lmQ0JqvNdkMA+Q2s04UXLEAgd/dBQqTqjLVPgOrgT6AMf4+IdMo1+ct5AGhO8RIXqYAo 443Q== Received: by 10.50.193.196 with SMTP id hq4mr2666661igc.57.1340390366966; Fri, 22 Jun 2012 11:39:26 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp80027ibb; Fri, 22 Jun 2012 11:39:26 -0700 (PDT) Received: by 10.68.238.68 with SMTP id vi4mr12371964pbc.123.1340390365944; Fri, 22 Jun 2012 11:39:25 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id qg1si10730208pbc.180.2012.06.22.11.39.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jun 2012 11:39:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of rajagopal.venkat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of rajagopal.venkat@linaro.org) smtp.mail=rajagopal.venkat@linaro.org Received: by pbbrr4 with SMTP id rr4so4640714pbb.37 for ; Fri, 22 Jun 2012 11:39:25 -0700 (PDT) Received: by 10.68.219.135 with SMTP id po7mr12145396pbc.149.1340390364892; Fri, 22 Jun 2012 11:39:24 -0700 (PDT) Received: from localhost.localdomain ([101.63.209.171]) by mx.google.com with ESMTPS id ku7sm39674793pbc.31.2012.06.22.11.39.20 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jun 2012 11:39:24 -0700 (PDT) From: Rajagopal Venkat To: powertop@lists.01.org Cc: patches@linaro.org, linaro-dev@lists.linaro.org, Rajagopal Venkat Subject: [Powertop][PATCH] fix cpuidle state name parsing Date: Sat, 23 Jun 2012 00:08:46 +0530 Message-Id: <1340390327-2836-1-git-send-email-rajagopal.venkat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQmjdRt4ZXE+2IytaMHQ2dHwKR5pXUe2KWJGotEgMtVU4hikKg7mXK7ocmyWiPGcPO8IY7xW parse cpuidle C state based on sysfs file entry(stateX) instead of state name/description Signed-off-by: Rajagopal Venkat --- 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;