From patchwork Thu Aug 8 13:48:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18874 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 71FE6246A4 for ; Thu, 8 Aug 2013 13:51:56 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id a11sf3627596qen.3 for ; Thu, 08 Aug 2013 06:51:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=fKQbvBSleC0K7P1WaaiV7fnC6bfGjeKAZL43K747LNE=; b=QIDSiiAS6ojbD7sTJVfBUmh3JD6/GwWokAcCqxZ64Xr7RiLQKxOT5nezPQo4PRFGjU RCKQUzUZGksCluCZ+R75T+3YtYe5BvCrtDpnYqvxOMX6+GBHZU7fTKwHANnIfegXHW6e GbHbWeSx/RMItGg2aZ0YPSWXnUJtyyMGMFb8/aFz1OHwUbe9dW/CjCXlgjpuz7aj+yRm EVzoNRjfR6UwHRuDND5H9aPpPgbnJr3zpWWaj5rGT/LIGS9yfTq7r3zOOiZeqpzmODAT nO60eEFzah3zZej/ty95xBVNx1X+Cki40hULeqK3jycOeJ8enl7Ad1YS7wfAa3c3sNII v3Yg== X-Received: by 10.236.148.33 with SMTP id u21mr3155807yhj.37.1375969916260; Thu, 08 Aug 2013 06:51:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.73.193 with SMTP id n1ls1092921qev.50.gmail; Thu, 08 Aug 2013 06:51:56 -0700 (PDT) X-Received: by 10.58.34.178 with SMTP id a18mr3074423vej.86.1375969916128; Thu, 08 Aug 2013 06:51:56 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id fe2si1041771vcb.91.2013.08.08.06.51.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:51:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id pb11so3066087veb.39 for ; Thu, 08 Aug 2013 06:51:56 -0700 (PDT) X-Gm-Message-State: ALoCoQk6mK2iUBCoHgzOecttRPFcDvN4539rGANtdT1/5fVtqodxsIF3MW1SOgDJWrotMMOhGmZo X-Received: by 10.220.198.133 with SMTP id eo5mr4064633vcb.24.1375969916044; Thu, 08 Aug 2013 06:51:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp16845vcz; Thu, 8 Aug 2013 06:51:55 -0700 (PDT) X-Received: by 10.66.76.34 with SMTP id h2mr6073656paw.128.1375969915066; Thu, 08 Aug 2013 06:51:55 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id vs7si8591053pbc.295.2013.08.08.06.51.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:51:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.50; Received: by mail-pa0-f50.google.com with SMTP id fb10so3497665pad.37 for ; Thu, 08 Aug 2013 06:51:54 -0700 (PDT) X-Received: by 10.66.147.9 with SMTP id tg9mr6363123pab.5.1375969914545; Thu, 08 Aug 2013 06:51:54 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ys4sm14416453pbb.9.2013.08.08.06.51.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:51:53 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 25/35] cpufreq: powernow: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:27 +0530 Message-Id: <8ddaa40a58ddff7b5e7e7b689f241136adbd422e.1375964117.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Lets use cpufreq_table_validate_and_show() instead of calling cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernow-k6.c | 9 +-------- drivers/cpufreq/powernow-k7.c | 4 +--- drivers/cpufreq/powernow-k8.c | 4 +--- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c index 85f1c8c..ab1de0d 100644 --- a/drivers/cpufreq/powernow-k6.c +++ b/drivers/cpufreq/powernow-k6.c @@ -145,7 +145,6 @@ static int powernow_k6_target(struct cpufreq_policy *policy, static int powernow_k6_cpu_init(struct cpufreq_policy *policy) { unsigned int i, f; - int result; if (policy->cpu != 0) return -ENODEV; @@ -167,13 +166,7 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 200000; policy->cur = busfreq * max_multiplier; - result = cpufreq_frequency_table_cpuinfo(policy, clock_ratio); - if (result) - return result; - - cpufreq_frequency_table_get_attr(clock_ratio, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, clock_ratio); } diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index 14ce480..c863c13 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c @@ -680,9 +680,7 @@ static int powernow_cpu_init(struct cpufreq_policy *policy) policy->cur = powernow_get(0); - cpufreq_frequency_table_get_attr(powernow_table, policy->cpu); - - return cpufreq_frequency_table_cpuinfo(policy, powernow_table); + return cpufreq_table_validate_and_show(policy, powernow_table); } static int powernow_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index 2344a9e..8d4114a 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -1156,7 +1156,7 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol) pr_debug("policy current frequency %d kHz\n", pol->cur); /* min/max the cpu is capable of */ - if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) { + if (cpufreq_table_validate_and_show(pol, data->powernow_table)) { printk(KERN_ERR FW_BUG PFX "invalid powernow_table\n"); powernow_k8_cpu_exit_acpi(data); kfree(data->powernow_table); @@ -1164,8 +1164,6 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol) return -EINVAL; } - cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu); - pr_debug("cpu_init done, current fid 0x%x, vid 0x%x\n", data->currfid, data->currvid);