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: 274781 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E1DB92C0168 for ; Sat, 14 Sep 2013 00:04:58 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757651Ab3IMNIE (ORCPT ); Fri, 13 Sep 2013 09:08:04 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:41843 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757640Ab3IMNIB (ORCPT ); Fri, 13 Sep 2013 09:08:01 -0400 Received: by mail-pb0-f50.google.com with SMTP id uo5so1203617pbc.23 for ; Fri, 13 Sep 2013 06:08:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=GlKwFgC/IBdUYDNVno2QSkfsGexSXeHUGr7oKXLH8oc=; b=TNMZvczihQppgQlcARyjfPvVRIBjl9+6VKCr8t9OyKu6jv/OQhlUg1LwrXEGXXHOz9 BLwwyqgG63rBtBLBUFptd/7DpIn/2DC95bQ7AFzNprgXdLaI8MtE38X9kAHis6cDqY2g DpFZ9nZaTD9n4o7+/jhEXPVnkid21ISA5hbzmgNlsY1gvNpdn7EGJ7Aao30ist7nIZ17 +x5ctgP06mwp0bA4kOegSDRoX0J008bn5TT9y7IzCJHAWuDwbaal/+00VT9PqREAK5H1 4Ornfd/Ea8EQYu9690ty7wtCg6cvzorrWbDyIa9Z5o4TkipLERTA6bGWiqL7UpjsZv0R HSvg== X-Gm-Message-State: ALoCoQkmSVQF8lrm0guS7yujkNVDgxxgs80GOSgvWwzp0rDDQm0uF4KOPd6iVutMIsJ4Tt7m2j1c 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: Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org 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 Acked-by: David S. Miller --- 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)