From patchwork Sat Aug 10 06:44:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18966 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8CFD7246EB for ; Sat, 10 Aug 2013 06:51:50 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hf12sf1154418vcb.7 for ; Fri, 09 Aug 2013 23:51:50 -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=1MRruBxreNtCuwxtYk7ZPY3xW2Hy+NK0ZlmwrQyJhiI=; b=dp7gYVVaj47dqW4Mtyu0sR9kgqKGytI9faczhnszMvGiEEiQJ3uXBbf5IumB5wkM/e 8RigDLJNVUfMKlYBNp1GUWrVMvOh3dox665CQj/JyB3CnQvXkT0M9y6lZYU8OiAmzdox 9XKtK57c5KpLAi8gcXwHiDEd4DY4G9QUTXKViJYtMsmDsKmN8Y3UiGtBWhO6q4BSj64H C2EvSZ6WWM1p7g1H+WbXkgXO+C7yMa15eii7PayByjSiugrZ2cnIkP2iYO2ARlaRdgG1 VIZv0Qftuda2e9dc7bYeZ3pFxiJxYrni6U1jds7o3jS+AKBxXl4ySdhCGrb/cxaG+jRY ctPg== X-Received: by 10.236.38.106 with SMTP id z70mr6633506yha.29.1376117510315; Fri, 09 Aug 2013 23:51:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.10 with SMTP id em10ls1704007qeb.82.gmail; Fri, 09 Aug 2013 23:51:50 -0700 (PDT) X-Received: by 10.58.155.37 with SMTP id vt5mr2191858veb.41.1376117510200; Fri, 09 Aug 2013 23:51:50 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id l7si5676495vcg.130.2013.08.09.23.51.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 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.47; Received: by mail-vb0-f47.google.com with SMTP id h10so4551071vbh.20 for ; Fri, 09 Aug 2013 23:51:50 -0700 (PDT) X-Gm-Message-State: ALoCoQm63IXBHsym8j2uLa9c5b64eCcuPvOUNWesl6L9JUcsKkElnhfEJpMzSX08Ogk9aGNce0kb X-Received: by 10.220.164.202 with SMTP id f10mr8474398vcy.25.1376117510129; Fri, 09 Aug 2013 23:51:50 -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 u4csp223vcz; Fri, 9 Aug 2013 23:51:49 -0700 (PDT) X-Received: by 10.66.162.167 with SMTP id yb7mr4164550pab.16.1376117509112; Fri, 09 Aug 2013 23:51:49 -0700 (PDT) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by mx.google.com with ESMTPS id xx2si7270626pac.140.2013.08.09.23.51.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.169 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.169; Received: by mail-pd0-f169.google.com with SMTP id r10so1399810pdi.0 for ; Fri, 09 Aug 2013 23:51:48 -0700 (PDT) X-Received: by 10.66.221.8 with SMTP id qa8mr14792820pac.188.1376117508756; Fri, 09 Aug 2013 23:51:48 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id bg3sm24131757pbb.44.2013.08.09.23.51.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:48 -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 33/44] cpufreq: ppc_cbe: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:29 +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.47 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/ppc_cbe_cpufreq.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c b/drivers/cpufreq/ppc_cbe_cpufreq.c index 6c5be63..38540d1 100644 --- a/drivers/cpufreq/ppc_cbe_cpufreq.c +++ b/drivers/cpufreq/ppc_cbe_cpufreq.c @@ -128,17 +128,6 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) return cpufreq_table_validate_and_show(policy, cbe_freqs); } -static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy) -{ - cpufreq_frequency_table_put_attr(policy->cpu); - return 0; -} - -static int cbe_cpufreq_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, cbe_freqs); -} - static int cbe_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) @@ -174,10 +163,10 @@ static int cbe_cpufreq_target(struct cpufreq_policy *policy, } static struct cpufreq_driver cbe_cpufreq_driver = { - .verify = cbe_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = cbe_cpufreq_target, .init = cbe_cpufreq_cpu_init, - .exit = cbe_cpufreq_cpu_exit, + .exit = cpufreq_generic_exit, .name = "cbe-cpufreq", .flags = CPUFREQ_CONST_LOOPS, };