From patchwork Sat Aug 10 06:44:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18976 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9DF7A246EB for ; Sat, 10 Aug 2013 06:53:02 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id l109sf5841674yhq.5 for ; Fri, 09 Aug 2013 23:53:02 -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=WBn8uMrJr1VUSgQlWh2FYrR0bdw92+WqOA54fZlcgjo=; b=QmwU2Cg35RQrir6gi+0HWrhplpzYjPkXlA2WCCnfeqbdEW4Q2lEkqMpHLJgtCNz9n2 aDOXUdOp+8g+0GfIryez80X0GXnf+q8mW03Wdyvfp/D2r0CxLfji0sThLM+KVsXvF+7u +fTAe02QUejyBNeoQTPgqk0sy9shW9n2lB5agBUtUF2CSrzRVzhqYT7jZN82uwICGxQ6 KOJ7aq6bmO/uaCnH73b66tLiMF4b0FIxhVkNRRSCJ8HUuWPi0P+CUBGZOnUUAX3TlqSa Lx7JFW+dpDGB19On/34nDjaJV+rggAwrypD/XAhTccQg6Qmfo7p2OO1CoZWhkNG0iCgK gbtg== X-Received: by 10.224.103.68 with SMTP id j4mr15891294qao.8.1376117582381; Fri, 09 Aug 2013 23:53:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.231 with SMTP id n7ls1696009qen.14.gmail; Fri, 09 Aug 2013 23:53:02 -0700 (PDT) X-Received: by 10.58.227.198 with SMTP id sc6mr2264981vec.59.1376117582270; Fri, 09 Aug 2013 23:53:02 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id od10si5681670vcb.86.2013.08.09.23.53.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:53:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 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.52; Received: by mail-vb0-f52.google.com with SMTP id f12so4584008vbg.39 for ; Fri, 09 Aug 2013 23:53:02 -0700 (PDT) X-Gm-Message-State: ALoCoQlpdeiMONsqjdbfCRr41rYaPaRW2Y/ZL1hkvHx/b3kTgHwpTJDIvu87/4jWDLgeQIyMKlJP X-Received: by 10.58.128.71 with SMTP id nm7mr7683032veb.51.1376117582189; Fri, 09 Aug 2013 23:53:02 -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 u4csp272vcz; Fri, 9 Aug 2013 23:53:01 -0700 (PDT) X-Received: by 10.66.149.231 with SMTP id ud7mr15285862pab.8.1376117581294; Fri, 09 Aug 2013 23:53:01 -0700 (PDT) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx.google.com with ESMTPS id mp5si14646128pbc.153.2013.08.09.23.53.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:53:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.44 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.44; Received: by mail-pa0-f44.google.com with SMTP id fz6so2917801pac.3 for ; Fri, 09 Aug 2013 23:53:00 -0700 (PDT) X-Received: by 10.69.16.99 with SMTP id fv3mr1433931pbd.60.1376117580916; Fri, 09 Aug 2013 23:53:00 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id x8sm24144027pbb.39.2013.08.09.23.52.57 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:53:00 -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 , Guan Xuetao Subject: [PATCH 43/44] cpufreq: unicore2: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:39 +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.52 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: Guan Xuetao Signed-off-by: Viresh Kumar --- drivers/cpufreq/unicore2-cpufreq.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/cpufreq/unicore2-cpufreq.c b/drivers/cpufreq/unicore2-cpufreq.c index 12fc904..b9f693c 100644 --- a/drivers/cpufreq/unicore2-cpufreq.c +++ b/drivers/cpufreq/unicore2-cpufreq.c @@ -21,20 +21,6 @@ static struct cpufreq_driver ucv2_driver; -/* make sure that only the "userspace" governor is run - * -- anything else wouldn't make sense on this platform, anyway. - */ -int ucv2_verify_speed(struct cpufreq_policy *policy) -{ - if (policy->cpu) - return -EINVAL; - - cpufreq_verify_within_limits(policy, - policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); - - return 0; -} - static unsigned int ucv2_getspeed(unsigned int cpu) { struct clk *mclk = clk_get(NULL, "MAIN_CLK"); @@ -77,7 +63,7 @@ static int __init ucv2_cpu_init(struct cpufreq_policy *policy) static struct cpufreq_driver ucv2_driver = { .flags = CPUFREQ_STICKY, - .verify = ucv2_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = ucv2_target, .get = ucv2_getspeed, .init = ucv2_cpu_init,