From patchwork Sat Aug 10 06:44:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18958 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5F2AA246EB for ; Sat, 10 Aug 2013 06:50:55 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id ht10sf2405329vcb.5 for ; Fri, 09 Aug 2013 23:50:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state: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=79A2bpthEnJHkQhh9vnhp2orjfxJa2C6oqU3vMAQUWc=; b=SXICcCfsVma4YA6lBS+uJfyaWit18yuf5ds/EIgPBk6YG/AJ0w1nBStVqTTkngZeN2 o4QYFJdIbMg0nLggPZMFkCUQ6r+RisVTc51PW+p8ZIfyI8nBaUr+N7MP5WAf1WN9501Z dHHJSvHRhktlGS9mvuebGtTJHEUWPmRXDHlHWyDD6D6Y7+nOci+r3efqPBaFgoesQBQl AUYfyVwnRk+SJ1vyPtoQzJLfA4oX691MlvSQ6CeKEnvrAPEeuFXDvgtaKya+oxq88YRg pSU7eL3u49hA4OTykCtekmAlqAjHBlN/vgmmoJTBLSLXNQi2KoylT3jNxVbTgoPA1MzL a77A== X-Received: by 10.236.74.169 with SMTP id x29mr6896554yhd.34.1376117455087; Fri, 09 Aug 2013 23:50:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.231 with SMTP id n7ls1695059qen.14.gmail; Fri, 09 Aug 2013 23:50:54 -0700 (PDT) X-Received: by 10.52.66.242 with SMTP id i18mr1795245vdt.3.1376117454949; Fri, 09 Aug 2013 23:50:54 -0700 (PDT) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id ae9si5681496vdc.54.2013.08.09.23.50.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:50:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.45 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.45; Received: by mail-vb0-f45.google.com with SMTP id e15so4590112vbg.18 for ; Fri, 09 Aug 2013 23:50:54 -0700 (PDT) X-Gm-Message-State: ALoCoQlidHRAUKYiNvxYwpuJ3RsSkUPpusLsiNZxkRgyaP0B1l04wK9+R2F1Hf7Nx0IqvcR2Fvb6 X-Received: by 10.58.128.71 with SMTP id nm7mr7681225veb.51.1376117454859; Fri, 09 Aug 2013 23:50:54 -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 u4csp184vcz; Fri, 9 Aug 2013 23:50:54 -0700 (PDT) X-Received: by 10.66.146.199 with SMTP id te7mr15055651pab.106.1376117453957; Fri, 09 Aug 2013 23:50:53 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by mx.google.com with ESMTPS id yk3si15799803pac.12.2013.08.09.23.50.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:50:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id y10so1385426pdj.25 for ; Fri, 09 Aug 2013 23:50:53 -0700 (PDT) X-Received: by 10.68.137.134 with SMTP id qi6mr14840476pbb.154.1376117453486; Fri, 09 Aug 2013 23:50:53 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ai6sm26650387pad.15.2013.08.09.23.50.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:50:52 -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, Viresh Kumar , Dmitry Eremin-Solenikov Subject: [PATCH 25/44] cpufreq: maple: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:21 +0530 Message-Id: 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.45 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 19076cc..7720670 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)