From patchwork Fri Sep 13 12:59:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20096 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 73812202E6 for ; Fri, 13 Sep 2013 13:08:02 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id gf11sf1191476vcb.2 for ; Fri, 13 Sep 2013 06:08:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=GlKwFgC/IBdUYDNVno2QSkfsGexSXeHUGr7oKXLH8oc=; b=iSenec08IFEWYd8SL3PR+z+tEBJeNa5ytSjbnNK9pJOPRukZdQtZlKQL73lHM0Zx/u lwTeDv4hlvcMD4+dATwlrgvX74JOmvqLdP5BtmZ5gGfmlcdOjubxCeTAoXCZqbwcbZW9 +Bg/A6Ad8Kua9+NSbo4t/3DxKrJgjGhSDfXndERtvTOsnRlaWD+3l3xP9kLGFPID5gXc Nv4DypXVqQVJ+PsTCBnzojgm5FDOpEx8drFU6LSwpbw2tGrSNm5t9R2S5N5vAzdU3i3N COsZclL2mj011igvt1Uv/8Uzk/kjLwCAbf6U1RAm5RY6AkdDfvwkbYTAgG8uaGgRvNoR ggRg== X-Gm-Message-State: ALoCoQnt22WrYLcqaAOTCaDY2BErKV4KmsqrAjxNpE/9wZVsaqz52IFWLQ/DHyfGDyun2smLKRkv X-Received: by 10.236.51.9 with SMTP id a9mr5074956yhc.41.1379077682203; Fri, 13 Sep 2013 06:08:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.110.9 with SMTP id hw9ls1098927qeb.16.gmail; Fri, 13 Sep 2013 06:08:02 -0700 (PDT) X-Received: by 10.52.27.243 with SMTP id w19mr6441723vdg.3.1379077682000; Fri, 13 Sep 2013 06:08:02 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id jc7si3094404vdb.65.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:08:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id x14so915495vbb.9 for ; Fri, 13 Sep 2013 06:08:01 -0700 (PDT) X-Received: by 10.58.46.229 with SMTP id y5mr4498331vem.15.1379077681928; Fri, 13 Sep 2013 06:08:01 -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 u4csp79695vcz; Fri, 13 Sep 2013 06:08:01 -0700 (PDT) X-Received: by 10.68.135.70 with SMTP id pq6mr1549424pbb.200.1379077681069; Fri, 13 Sep 2013 06:08:01 -0700 (PDT) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by mx.google.com with ESMTPS id sl4si11195896pac.97.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:08:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.176 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.176; Received: by mail-pd0-f176.google.com with SMTP id q10so1224730pdj.35 for ; Fri, 13 Sep 2013 06:08:00 -0700 (PDT) X-Received: by 10.68.191.193 with SMTP id ha1mr8862297pbc.166.1379077680618; Fri, 13 Sep 2013 06:08:00 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id wp8sm11661716pbc.26.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:08:00 -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 , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH 042/228] cpufreq: sparc: use cpufreq_table_validate_and_show() Date: Fri, 13 Sep 2013 18:29:48 +0530 Message-Id: <454f6bb0c5fa53654e694c82db6ca758410826f5.1379063063.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.212.50 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: David S. Miller Cc: sparclinux@vger.kernel.org Signed-off-by: Viresh Kumar --- drivers/cpufreq/sparc-us2e-cpufreq.c | 6 +----- drivers/cpufreq/sparc-us3-cpufreq.c | 7 +------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index 80e6d92..e35840d 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c @@ -307,7 +307,6 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000; struct cpufreq_frequency_table *table = &us2e_freq_table[cpu].table[0]; - int ret; table[0].driver_data = 0; table[0].frequency = clock_tick / 1; @@ -325,10 +324,7 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 0; policy->cur = clock_tick; - 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 int us2e_freq_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index 73a90de..23f2d3b 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c @@ -168,7 +168,6 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000; struct cpufreq_frequency_table *table = &us3_freq_table[cpu].table[0]; - int ret; table[0].driver_data = 0; table[0].frequency = clock_tick / 1; @@ -182,11 +181,7 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 0; policy->cur = clock_tick; - 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 int us3_freq_cpu_exit(struct cpufreq_policy *policy)