From patchwork Thu Aug 8 13:48:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 63B9FBF546 for ; Thu, 8 Aug 2013 15:02:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB2322051C for ; Thu, 8 Aug 2013 15:02:31 +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 7C2C020516 for ; Thu, 8 Aug 2013 15:02:26 +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 1V7QgY-0006jg-7I; Thu, 08 Aug 2013 13:55:27 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qfw-0004vP-CO; Thu, 08 Aug 2013 13:54:48 +0000 Received: from mail-pb0-f51.google.com ([209.85.160.51]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qdo-0004bw-T6 for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:52:38 +0000 Received: by mail-pb0-f51.google.com with SMTP id jt11so3260078pbb.10 for ; Thu, 08 Aug 2013 06:52:16 -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=Qy/7/jY1cq6sSZgDe6S9P643CmTpN7QgsqQgfiZj5wE=; b=EmXTab5Dh1nqQ4nJPqEr6J0p543QqeI1qA4ad+BndUIxeg9nkgZU2/C//6+0dTdL3X Nb8UaKFIvO8uNRVNuBqRJKsSlMv+Vn7bpO49dMHGt05XO5ttI4AAoCHQS2//ndlfaZ6Y FxkW6bqIwZKwAROV6NPfhnTzJx9LfPHzgdM6qmZiNfHu5buW4EGe64eLlnh4J+o56UWz wlil8mvst0Uir03J3nOHrZPD3NOaWIkZyZk5DKNkFK+oa0CCPPwL0HIFqVkwsjcfSSBJ wh33EvdmvH4ZBMX9/RCycWE55Mm1gK8z/No4eHP0F+oxCk1OnBD70lFdf9KFAIdiCuub VvFg== X-Gm-Message-State: ALoCoQlO993W3KGFY8dH6rh4lr1/NrD1qE9y2YphzNsc7bhjY18/Ch99aeNtmcdQt3sJ4l3bZz/T X-Received: by 10.68.212.106 with SMTP id nj10mr6259866pbc.74.1375969935977; Thu, 08 Aug 2013 06:52:15 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id nj9sm14411646pbc.13.2013.08.08.06.52.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:15 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 28/35] cpufreq: s3cx4xx: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:30 +0530 Message-Id: <327031ccaa47008946fabc17bba13645456cdf66.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_095237_066679_14637386 X-CRM114-Status: GOOD ( 11.50 ) 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, Kukjin Kim , 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: Kukjin Kim Signed-off-by: Viresh Kumar --- drivers/cpufreq/s3c2416-cpufreq.c | 4 +--- drivers/cpufreq/s3c24xx-cpufreq.c | 6 ++---- drivers/cpufreq/s3c64xx-cpufreq.c | 5 +---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c index 22dcb81..a7a4c61 100644 --- a/drivers/cpufreq/s3c2416-cpufreq.c +++ b/drivers/cpufreq/s3c2416-cpufreq.c @@ -494,12 +494,10 @@ static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = (500 * 1000) + s3c_freq->regulator_latency; - ret = cpufreq_frequency_table_cpuinfo(policy, s3c_freq->freq_table); + ret = cpufreq_table_validate_and_show(policy, s3c_freq->freq_table); if (ret) goto err_freq_table; - cpufreq_frequency_table_get_attr(s3c_freq->freq_table, 0); - register_reboot_notifier(&s3c2416_cpufreq_reboot_notifier); return 0; diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index 8843454..39c1d3e 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq.c +++ b/drivers/cpufreq/s3c24xx-cpufreq.c @@ -386,10 +386,8 @@ static int s3c_cpufreq_init(struct cpufreq_policy *policy) /* feed the latency information from the cpu driver */ policy->cpuinfo.transition_latency = cpu_cur.info->latency; - if (ftab) { - cpufreq_frequency_table_cpuinfo(policy, ftab); - cpufreq_frequency_table_get_attr(ftab, policy->cpu); - } + if (ftab) + return cpufreq_table_validate_and_show(policy, ftab); return 0; } diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c index 9024043..872f74d 100644 --- a/drivers/cpufreq/s3c64xx-cpufreq.c +++ b/drivers/cpufreq/s3c64xx-cpufreq.c @@ -251,15 +251,12 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy) */ policy->cpuinfo.transition_latency = (500 * 1000) + regulator_latency; - ret = cpufreq_frequency_table_cpuinfo(policy, s3c64xx_freq_table); + ret = cpufreq_table_validate_and_show(policy, s3c64xx_freq_table); if (ret != 0) { pr_err("Failed to configure frequency table: %d\n", ret); regulator_put(vddarm); clk_put(armclk); - } else { - cpufreq_frequency_table_get_attr(s3c64xx_freq_table, - policy->cpu); } return ret;