From patchwork Thu Aug 8 13:48:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841272 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 764199F294 for ; Thu, 8 Aug 2013 15:03:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D97AF20522 for ; Thu, 8 Aug 2013 15:03:22 +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 178862051B for ; Thu, 8 Aug 2013 15:03:18 +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 1V7QeH-0005NM-U3; Thu, 08 Aug 2013 13:53:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qe8-0004hS-O8; Thu, 08 Aug 2013 13:52:56 +0000 Received: from mail-pa0-f51.google.com ([209.85.220.51]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QcY-0004N5-Ta for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:51:22 +0000 Received: by mail-pa0-f51.google.com with SMTP id lf1so646666pab.38 for ; Thu, 08 Aug 2013 06:50:57 -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=RZ+r1XpVuMLrXT8RRrSpuPD4tUOeZYp4guSwo5kLkso=; b=VIyywgjNfv0Slw1lCWQM6b6wdVOkaAckI0VmkQw9xW6u5Gt/gZIKEIiehODvng0cLE JANdfUUxe9TQh32iTC892hT4Q6Kaj1yPSPtcmUjlzbxmMXaQ9Pd9x3YezHT6DVPWZZxj re9To/YSTdoOtwRbh4hltbzBtGa2XiJBUVUDYWcZRdK0FN6WFSrVj+fgdKW5j+S9OI0W duGd+IQ8q9Ic9LGD9cURwY7vDq7LVjKFCptaKy/myHCzSm3IsgvMyMIJqJl1hxQjrWFn yLCPEoB5g5LBVLYmD3J2ruQYu/7yxrp1ILObNMPzl/wLQBGvxshDCZ/Ss9B7shYKwywq wiPA== X-Gm-Message-State: ALoCoQky5M8JIbj4/yeY9iWsIC3/dQ2znZG0jv3SFb4RTGVeoVrvdhb2qFSATcrC+nYQzX/H+c5u X-Received: by 10.68.196.37 with SMTP id ij5mr6113454pbc.175.1375969857567; Thu, 08 Aug 2013 06:50:57 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ss8sm16716069pab.6.2013.08.08.06.50.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:56 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 17/35] cpufreq: kirkwood: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:19 +0530 Message-Id: <8b7f30f52b99c21697168d77f1fae298dad50226.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_095119_447631_764936EF X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: -2.6 (--) Cc: Andrew Lunn , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, 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: Andrew Lunn Signed-off-by: Viresh Kumar --- drivers/cpufreq/kirkwood-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c index 45e4d7f..336f171 100644 --- a/drivers/cpufreq/kirkwood-cpufreq.c +++ b/drivers/cpufreq/kirkwood-cpufreq.c @@ -125,19 +125,11 @@ static int kirkwood_cpufreq_target(struct cpufreq_policy *policy, /* Module init and exit code */ static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy) { - int result; - /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 5000; /* 5uS */ policy->cur = kirkwood_cpufreq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, kirkwood_freq_table); - if (result) - return result; - - cpufreq_frequency_table_get_attr(kirkwood_freq_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, kirkwood_freq_table); } static int kirkwood_cpufreq_cpu_exit(struct cpufreq_policy *policy)