From patchwork Thu Aug 8 13:48:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DC0E69F271 for ; Thu, 8 Aug 2013 15:45:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B815820257 for ; Thu, 8 Aug 2013 15:45:29 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F40CC2022D for ; Thu, 8 Aug 2013 15:45:24 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qh6-0007CW-Dh; Thu, 08 Aug 2013 13:56:01 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QgR-0004z0-2f; Thu, 08 Aug 2013 13:55:19 +0000 Received: from mail-pb0-f54.google.com ([209.85.160.54]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QeL-0004gg-LG for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:53:10 +0000 Received: by mail-pb0-f54.google.com with SMTP id ro12so3270157pbb.27 for ; Thu, 08 Aug 2013 06:52:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=GlKwFgC/IBdUYDNVno2QSkfsGexSXeHUGr7oKXLH8oc=; b=Z5ynkm3VrZvHd1+IAYCrwwtrX5W+nEwHsuQ4uRS7DU1i630pxh5jRFbv/qLinFIh6Y PezvJ/Z+8kzk0bO218ejN+TPiBP2cI8SjqKqrXnDF2yXapWzrQTG/tjRjHpG/XWoA9KA iTvG8vYH1H7hqQCNn69auRfSmLuI4RG2cFVIr2EnGbF68gdI84XXyxFRA6J/j5pB4X+g HQ6DcMgdAcb0ENezaGcQcNQK+Kj8+sW0eBXOo5oElOW3f7rw/rFkOxcRjk9lD95VNzqe e/nXetF6hVqZFXv+I1GbqZzNbqPpRavY3M9NSln2C/krP8Ya6XqM69f6Q0PWTaPZQm/T P2Zw== X-Gm-Message-State: ALoCoQmAsKs0SPjce9jEnwDrzGx/ZhQFmU1wJngTCJg1B/0fWYthvAxkdeHDq5/17b90b4oia528 X-Received: by 10.68.234.72 with SMTP id uc8mr6356729pbc.35.1375969968439; Thu, 08 Aug 2013 06:52:48 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id xl3sm14407728pbb.17.2013.08.08.06.52.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:47 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 32/35] cpufreq: sparc: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:34 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130808_095309_838362_059662E3 X-CRM114-Status: GOOD ( 11.00 ) X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, sparclinux@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)