From patchwork Fri Sep 13 13:00:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20113 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f69.google.com (mail-qe0-f69.google.com [209.85.128.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6C14B20358 for ; Fri, 13 Sep 2013 13:10:02 +0000 (UTC) Received: by mail-qe0-f69.google.com with SMTP id 1sf1207582qec.8 for ; Fri, 13 Sep 2013 06:10:02 -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=Tg2+F3hknkkjhgrAEJKIONYmSBfrkT9Kp0mlJjoj/tc=; b=Sfb2cDMeqi8Sa/95BIiSBgkVR8AGXD3UAG3xt47Lwo1Y5SNacXXnEO8Q/MsAjJCPqh lxxCb0ChiwF4RafxheQiZXeC0tvN5SkvBdGLortNiFMTLRIM5Iq3DAj25w48bmjKu4fF +3ISFCLr830tExB2bhx9JFv7lzB9pIlc/CisOunV9astVXsKOcnkmSIwU1i8rYmM6rPA QigMOiScgg4w22ayoDiaWNJeorzN+exvMObNEaAVb0geZWdMl/CBwCqw4uAISd63stOY nUGKddnbz+IXTGFIFYKR/LZHeNd7kP7oX0/kUr3g23YMwYkZjlfbaD+5CcA3HW4O2yaJ FfpQ== X-Gm-Message-State: ALoCoQmMRv9fGl+6o+q0ZdAfmqiXxPOf1Vb1UenFA8zV+GFIeoPiiLiuoKVh2sd646JNhh5xXj/O X-Received: by 10.236.93.45 with SMTP id k33mr5143486yhf.19.1379077802225; Fri, 13 Sep 2013 06:10:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.62.72 with SMTP id w8ls1155004qer.2.gmail; Fri, 13 Sep 2013 06:10:02 -0700 (PDT) X-Received: by 10.52.100.202 with SMTP id fa10mr10098336vdb.0.1379077801941; Fri, 13 Sep 2013 06:10:01 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id o5si3076791vdw.154.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lf11so888753vcb.21 for ; Fri, 13 Sep 2013 06:10:01 -0700 (PDT) X-Received: by 10.58.161.116 with SMTP id xr20mr11934924veb.2.1379077801801; Fri, 13 Sep 2013 06:10:01 -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 u4csp79793vcz; Fri, 13 Sep 2013 06:10:01 -0700 (PDT) X-Received: by 10.68.6.232 with SMTP id e8mr13433395pba.132.1379077800886; Fri, 13 Sep 2013 06:10:00 -0700 (PDT) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by mx.google.com with ESMTPS id pz2si10816925pac.28.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.182 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.182; Received: by mail-pd0-f182.google.com with SMTP id r10so1234425pdi.13 for ; Fri, 13 Sep 2013 06:10:00 -0700 (PDT) X-Received: by 10.68.6.97 with SMTP id z1mr1253717pbz.131.1379077800500; Fri, 13 Sep 2013 06:10:00 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id gh9sm11654649pbc.40.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:09:59 -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 , Steven Miao Subject: [PATCH 059/228] cpufreq: blackfin: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:05 +0530 Message-Id: <47d7b682a43f352686a9a927642cb84fc74e8399.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.220.176 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: Steven Miao Signed-off-by: Viresh Kumar --- drivers/cpufreq/blackfin-cpufreq.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/cpufreq/blackfin-cpufreq.c b/drivers/cpufreq/blackfin-cpufreq.c index 84d446a..48888cf 100644 --- a/drivers/cpufreq/blackfin-cpufreq.c +++ b/drivers/cpufreq/blackfin-cpufreq.c @@ -191,11 +191,6 @@ static int bfin_target(struct cpufreq_policy *policy, return ret; } -static int bfin_verify_speed(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, bfin_freq_table); -} - static int __bfin_cpu_init(struct cpufreq_policy *policy) { @@ -213,25 +208,14 @@ static int __bfin_cpu_init(struct cpufreq_policy *policy) return cpufreq_table_validate_and_show(policy, bfin_freq_table); } -static int __bfin_cpu_exit(struct cpufreq_policy *policy) -{ - - cpufreq_frequency_table_put_attr(policy->cpu); -} - -static struct freq_attr *bfin_freq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver bfin_driver = { - .verify = bfin_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = bfin_target, .get = bfin_getfreq_khz, .init = __bfin_cpu_init, - .exit = __bfin_cpu_exit, + .exit = cpufreq_generic_exit, .name = "bfin cpufreq", - .attr = bfin_freq_attr, + .attr = cpufreq_generic_attr, }; static int __init bfin_cpu_init(void)