From patchwork Thu Aug 8 13:48:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18876 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BA7F5246A4 for ; Thu, 8 Aug 2013 13:52:10 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf816478ves.10 for ; Thu, 08 Aug 2013 06:52:10 -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=mpPIs3EYvuLxOiEUOvriS4dB70L6Gj+TvZ1h9ZANn4M=; b=GHK1bJ/3hH3JYDhrwtLdHF49Ps236s4FdeiAzNHVcWWZO4nAAp37ZBuSHu4h0nO6lk 0TAA1FJGRMrAyBTwySX2KKNBbqcBL4mUOZ+GpWRsOCX1EosJvexskE3YuY5m8pL+ARC9 xB5U+rRFbkG/YeKXs56vG68JX52u33i4hHmVKJwqqKVEEqk0DoRr8gdEcgoDvkX7v/F1 cEGLRPT5UhtDpthBLRDN7M3Rjoq944IEX2t4EzQfHNtjdNOrFnnOzhr5HDUe990ieGP5 ofRxk0Acajp0IfgqXW24SSsjTLuCuqrSphWNbSN1F4kiOm9bAB+EFJnFXAuQJ6Yv6daE BHEQ== X-Received: by 10.236.91.4 with SMTP id g4mr3412511yhf.30.1375969930386; Thu, 08 Aug 2013 06:52:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.44 with SMTP id i12ls1152015qen.41.gmail; Thu, 08 Aug 2013 06:52:10 -0700 (PDT) X-Received: by 10.220.53.7 with SMTP id k7mr3974158vcg.52.1375969930276; Thu, 08 Aug 2013 06:52:10 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id f8si3094777vec.85.2013.08.08.06.52.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id gf12so119058vcb.8 for ; Thu, 08 Aug 2013 06:52:10 -0700 (PDT) X-Gm-Message-State: ALoCoQkXLFEyeJoyQ753Nw5ikmN/RTOUzfKyyH9G0WPk1ItzfrMLinqc3VdfJye8ISurWDAF99q4 X-Received: by 10.58.211.227 with SMTP id nf3mr3223113vec.20.1375969930184; Thu, 08 Aug 2013 06:52:10 -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 u4csp16860vcz; Thu, 8 Aug 2013 06:52:09 -0700 (PDT) X-Received: by 10.66.224.237 with SMTP id rf13mr6386925pac.26.1375969929321; Thu, 08 Aug 2013 06:52:09 -0700 (PDT) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id cr3si8593021pbc.290.2013.08.08.06.52.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.47; Received: by mail-pa0-f47.google.com with SMTP id kl13so3492557pab.34 for ; Thu, 08 Aug 2013 06:52:09 -0700 (PDT) X-Received: by 10.66.161.38 with SMTP id xp6mr1353524pab.145.1375969928849; Thu, 08 Aug 2013 06:52:08 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id yg1sm14429391pbb.1.2013.08.08.06.52.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:08 -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 , Eric Miao Subject: [PATCH 27/35] cpufreq: pxa: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:29 +0530 Message-Id: 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.220.177 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(). Cc: Eric Miao Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 6 ++---- drivers/cpufreq/pxa3xx-cpufreq.c | 8 ++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index c7ea005..a429d7c 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -454,12 +454,10 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) pr_info("PXA255 cpufreq using %s frequency table\n", pxa255_turbo_table ? "turbo" : "run"); - cpufreq_frequency_table_cpuinfo(policy, pxa255_freq_table); - cpufreq_frequency_table_get_attr(pxa255_freq_table, policy->cpu); + cpufreq_table_validate_and_show(policy, pxa255_freq_table); } else if (cpu_is_pxa27x()) { - cpufreq_frequency_table_cpuinfo(policy, pxa27x_freq_table); - cpufreq_frequency_table_get_attr(pxa27x_freq_table, policy->cpu); + cpufreq_table_validate_and_show(policy, pxa27x_freq_table); } printk(KERN_INFO "PXA CPU frequency change support initialized\n"); diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index f53f28d6..89841f5 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -91,7 +91,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy, struct pxa3xx_freq_info *freqs, int num) { struct cpufreq_frequency_table *table; - int i, ret; + int i; table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL); if (table == NULL) @@ -108,11 +108,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy, pxa3xx_freqs_num = num; pxa3xx_freqs_table = table; - ret = cpufreq_frequency_table_cpuinfo(policy, table); - if (!ret) - cpufreq_frequency_table_get_attr(table, policy->cpu); - - return ret; + return cpufreq_table_validate_and_show(policy, table); } static void __update_core_freq(struct pxa3xx_freq_info *info)