From patchwork Thu Aug 8 13:48:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841279 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 D26449F295 for ; Thu, 8 Aug 2013 15:21:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 123B1202F7 for ; Thu, 8 Aug 2013 15:21:02 +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 792DD202C6 for ; Thu, 8 Aug 2013 15:21:00 +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 1V7Qcy-0003py-TS; Thu, 08 Aug 2013 13:51:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QcJ-0004OA-1b; Thu, 08 Aug 2013 13:51:03 +0000 Received: from mail-pa0-f45.google.com ([209.85.220.45]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qbd-0004CO-KO for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:50:23 +0000 Received: by mail-pa0-f45.google.com with SMTP id bg4so3482676pad.32 for ; Thu, 08 Aug 2013 06:49:59 -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=hu6SfmZQhW91RCGvyOkhP+7DL6YltrEuroaD+QpWUQ0=; b=JDn4Qypn6K9+bR++THNQ9WAXAEhRMfSagxfhEuGyq1JOxPHm5BQhKkULEC+CeUXVGB Sj+EdeFBq0aBfKHX7Hli58fFNjKy5oLeY8XsnEw4MMR8d+Dzx9C002mW9ea8bTDCltbp 2f4SonhwNLpdj5mtfvpns1l36tCHral8hp/wlHl1KW31ycuEGcDTUZ0kLAMvRUjiRAZg +oFtqsvxvQYKhS2ZdsGx/rOhJu5r7DEHlaJT1kkroqR8CTNLd9zpcvz8W3rWBg2Cwv/c VQ2i0fgRGRVfNW9aFtj819Jj5fX1aoLBGmvlE9BDMIH4DDIpzLmf7HJhATMW5JHovHev 51Wg== X-Gm-Message-State: ALoCoQl6dyuhCs8o377LwfDZQwLnUnbXnObARxIQN/l+bQ+MYmuwVPZZWm0WhvpK9R423AdK6ySp X-Received: by 10.69.17.1 with SMTP id ga1mr6208612pbd.38.1375969799357; Thu, 08 Aug 2013 06:49:59 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id t9sm14350107pba.46.2013.08.08.06.49.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:49:58 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 09/35] cpufreq: cris: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:11 +0530 Message-Id: <4ad1afa147eb2a5cca45c7f36344979783bd45e0.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130808_095021_797692_8ED0F5DB X-CRM114-Status: GOOD ( 11.17 ) X-Spam-Score: -0.8 (/) Cc: Jesper Nilsson , linaro-kernel@lists.linaro.org, linux-cris-kernel@axis.com, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, Mikael Starvik , 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=-2.4 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, 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: Jesper Nilsson Cc: Mikael Starvik Cc: linux-cris-kernel@axis.com Signed-off-by: Viresh Kumar --- drivers/cpufreq/cris-artpec3-cpufreq.c | 10 +--------- drivers/cpufreq/cris-etraxfs-cpufreq.c | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c index cb8276d..444fd96 100644 --- a/drivers/cpufreq/cris-artpec3-cpufreq.c +++ b/drivers/cpufreq/cris-artpec3-cpufreq.c @@ -76,19 +76,11 @@ static int cris_freq_target(struct cpufreq_policy *policy, static int cris_freq_cpu_init(struct cpufreq_policy *policy) { - int result; - /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 1000000; /* 1ms */ policy->cur = cris_freq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, cris_freq_table); - if (result) - return (result); - - cpufreq_frequency_table_get_attr(cris_freq_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, cris_freq_table); } diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c index 72328f7..428395e 100644 --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c +++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c @@ -75,19 +75,11 @@ static int cris_freq_target(struct cpufreq_policy *policy, static int cris_freq_cpu_init(struct cpufreq_policy *policy) { - int result; - /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 1000000; /* 1ms */ policy->cur = cris_freq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, cris_freq_table); - if (result) - return (result); - - cpufreq_frequency_table_get_attr(cris_freq_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, cris_freq_table); } static int cris_freq_cpu_exit(struct cpufreq_policy *policy)