From patchwork Sat Aug 10 06:44:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18962 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 3D30A246EB for ; Sat, 10 Aug 2013 06:51:23 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r13sf2709051yen.11 for ; Fri, 09 Aug 2013 23:51:23 -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=tO+8ik+1558tD+Qk0cFESQmJqndFQr+PMjl4jkTNhS4=; b=kFWBBlJbWMH6WVJoaHhBDWLgCNJyJZ3txznF036rHysBsWTwu9wMM2+nL/UpnI8rLB TmfI0GoaeEO7H2GxPz/Wx21O+BXOAqmm+/Ce+r5NWeLX5lIt+TaSBBXp3ocp/opLWbCM mouiIx7z50yt/++jeFrPuBODNEq9nPoXXSlUJDyYFkEQ42wF+q/lXiIUCPKcbrJydvjW ffn5pucO9ozFlGG/XoDJ0Y6eQMhvi8iL4ph0VKyiGvGjnd2ucNhHWTmcB1Tlv9irVR7N VIJjiIUV9LoGqST7mIPCMkeqn36CyZqbYrqm56139WnD+e7nPY2UTrJ85ymLvW9YLxJh 7tVQ== X-Received: by 10.236.206.105 with SMTP id k69mr6703290yho.8.1376117482997; Fri, 09 Aug 2013 23:51:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.10 with SMTP id em10ls1703972qeb.82.gmail; Fri, 09 Aug 2013 23:51:22 -0700 (PDT) X-Received: by 10.52.115.129 with SMTP id jo1mr1878818vdb.63.1376117482910; Fri, 09 Aug 2013 23:51:22 -0700 (PDT) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id sd9si5683307vdc.39.2013.08.09.23.51.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.42 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.42; Received: by mail-vb0-f42.google.com with SMTP id e12so4646507vbg.29 for ; Fri, 09 Aug 2013 23:51:22 -0700 (PDT) X-Gm-Message-State: ALoCoQkm9WjFCW+/cq18ZsJcoy3wen//F29Y4WCZxTFY02f5SaIFQ84s4/E3DpArtxNjfWlSFsDE X-Received: by 10.52.243.201 with SMTP id xa9mr1792184vdc.106.1376117482838; Fri, 09 Aug 2013 23:51:22 -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 u4csp200vcz; Fri, 9 Aug 2013 23:51:22 -0700 (PDT) X-Received: by 10.67.22.67 with SMTP id hq3mr14938433pad.132.1376117482005; Fri, 09 Aug 2013 23:51:22 -0700 (PDT) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id l2si15790295pan.83.2013.08.09.23.51.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.43; Received: by mail-pa0-f43.google.com with SMTP id hz10so5702440pad.16 for ; Fri, 09 Aug 2013 23:51:21 -0700 (PDT) X-Received: by 10.68.169.97 with SMTP id ad1mr14716950pbc.84.1376117481622; Fri, 09 Aug 2013 23:51:21 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id vu5sm26665533pab.10.2013.08.09.23.51.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:21 -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 Subject: [PATCH 29/44] cpufreq: pcc: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:25 +0530 Message-Id: <707070e59966ed3982ee52b367991e0b175e0319.1376116345.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.42 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. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pcc-cpufreq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index d81c4e5..90aa385 100644 --- a/drivers/cpufreq/pcc-cpufreq.c +++ b/drivers/cpufreq/pcc-cpufreq.c @@ -109,13 +109,6 @@ struct pcc_cpu { static struct pcc_cpu __percpu *pcc_cpu_info; -static int pcc_cpufreq_verify(struct cpufreq_policy *policy) -{ - cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, - policy->cpuinfo.max_freq); - return 0; -} - static inline void pcc_cmd(void) { u64 doorbell_value; @@ -582,7 +575,7 @@ static int pcc_cpufreq_cpu_exit(struct cpufreq_policy *policy) static struct cpufreq_driver pcc_cpufreq_driver = { .flags = CPUFREQ_CONST_LOOPS, .get = pcc_get_freq, - .verify = pcc_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = pcc_cpufreq_target, .init = pcc_cpufreq_cpu_init, .exit = pcc_cpufreq_cpu_exit,