From patchwork Fri Sep 13 13:00:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20126 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f200.google.com (mail-ye0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6C09320358 for ; Fri, 13 Sep 2013 13:11:35 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r3sf1153232yen.11 for ; Fri, 13 Sep 2013 06:11:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=hs3ROMdsP/MD4k31OSzWdDqVMh4jHMcj4FsT4Maa2us=; b=bGvdx3wGMKlYpban3PpGb5V/j6hDlzWMdAw8JifQ+t3loe+FGWFayH5sjo89e+Dvq2 EoTnXaTA13KU6RM50QvsSy3wODnrCO2qNtEoNEj8KwrGz+U18h88S1y69phGYd8JuWrj AQWbbA2va2MarihlLdc2mAHX94ukW3r1wPJuKRlWa9JqgcrLVYh+1M0a53IGq5Q41Tnc 2DxSTm/hgdtUqZTlyVgrvDmempaIlM1Y+XQtS+VdTUWVPyGbZjXHTSGS4zaF6697o/RF 8y+1KTS0bVOKS8HnuTsa9JN+gOmnCLOC88v+t7uwpT/h3ZBAvlw/4jxewgtk3TSU0sbp bFLw== X-Gm-Message-State: ALoCoQmd0dY+YcDSpnQK38dAqz6pU38pjo9qisrs0Blj1q8c5bS283dkQazE6zcCWR8aUVUmFyFk X-Received: by 10.236.51.9 with SMTP id a9mr5079050yhc.41.1379077895184; Fri, 13 Sep 2013 06:11:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.83.7 with SMTP id m7ls1176881qey.0.gmail; Fri, 13 Sep 2013 06:11:35 -0700 (PDT) X-Received: by 10.58.211.227 with SMTP id nf3mr12102250vec.20.1379077894972; Fri, 13 Sep 2013 06:11:34 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id u7si3112786vcn.37.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.48; Received: by mail-vb0-f48.google.com with SMTP id w16so878585vbf.7 for ; Fri, 13 Sep 2013 06:11:34 -0700 (PDT) X-Received: by 10.58.133.66 with SMTP id pa2mr11829927veb.18.1379077894898; Fri, 13 Sep 2013 06:11:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp79877vcz; Fri, 13 Sep 2013 06:11:34 -0700 (PDT) X-Received: by 10.66.156.199 with SMTP id wg7mr15091593pab.81.1379077894030; Fri, 13 Sep 2013 06:11:34 -0700 (PDT) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx.google.com with ESMTPS id tp5si11232200pac.19.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.54 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.54; Received: by mail-pb0-f54.google.com with SMTP id ro12so1218720pbb.13 for ; Fri, 13 Sep 2013 06:11:33 -0700 (PDT) X-Received: by 10.66.141.144 with SMTP id ro16mr2002204pab.173.1379077893585; Fri, 13 Sep 2013 06:11:33 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id fa4sm18004422pab.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:32 -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 , Dmitry Eremin-Solenikov Subject: [PATCH 072/228] cpufreq: maple: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:18 +0530 Message-Id: <5de7061f2f4c1038a288a24d86054cbb56ef5fa9.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: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Most of the CPUFreq drivers do similar things in .exit() and .verify() routines and .attr. So its better if we have generic routines for them which can be used by cpufreq drivers then. This patch uses these generic routines for this driver. Cc: Dmitry Eremin-Solenikov Signed-off-by: Viresh Kumar --- drivers/cpufreq/maple-cpufreq.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c index b3fb661..b23d1d8 100644 --- a/drivers/cpufreq/maple-cpufreq.c +++ b/drivers/cpufreq/maple-cpufreq.c @@ -64,11 +64,6 @@ static struct cpufreq_frequency_table maple_cpu_freqs[] = { {0, CPUFREQ_TABLE_END}, }; -static struct freq_attr *maple_cpu_freqs_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - /* Power mode data is an array of the 32 bits PCR values to use for * the various frequencies, retrieved from the device-tree */ @@ -135,11 +130,6 @@ static int maple_scom_query_freq(void) * Common interface to the cpufreq core */ -static int maple_cpufreq_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, maple_cpu_freqs); -} - static int maple_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) { @@ -190,10 +180,10 @@ static struct cpufreq_driver maple_cpufreq_driver = { .name = "maple", .flags = CPUFREQ_CONST_LOOPS, .init = maple_cpufreq_cpu_init, - .verify = maple_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = maple_cpufreq_target, .get = maple_cpufreq_get_speed, - .attr = maple_cpu_freqs_attr, + .attr = cpufreq_generic_attr, }; static int __init maple_cpufreq_init(void)