From patchwork Fri Sep 13 13:01:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20221 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f198.google.com (mail-ye0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 036F020358 for ; Fri, 13 Sep 2013 13:22:54 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m11sf1165939yen.1 for ; Fri, 13 Sep 2013 06:22:54 -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=3Fne24A/4u1YVt0+/kPCnFtWLI+zFd6ZFeRFQiPZQ4c=; b=Qhgjoy4RlnJfGJtJdS6T9uHooxvZCGbWlmQZ1BPtJhvpuk7cca8YprYHRqXnju0Ii2 4Zuk27oufoSN7OLkWeyEKny8WN6R28f89+a/+412hk7YisQUq4pfWNwU0DMAMiuHnw4X pJl+UD9BWqwsxlRC7tyOmZc1XhKJ0gRMCSS7O5cmc4KT4Y2iesL9/5IKqDx8ZF96WfX0 47jJKeUSuz9GOjI8oDbv46zpMgYiym4k/I2wMdYLPjJRFMXufCLocfGCQoO7ueGlMJGK mtEuuxfR/yp3NC8G+rPYuxI9JvA6nLAb51NJa+yQo1x5i/r24KJhzas0q4MmWTAGUXV2 dZSA== X-Gm-Message-State: ALoCoQlcnrLazslD8MJubmZNqHBOU2sEFOklFE4W54Poa3QsLETVB8Marm7TWb2/sDIB9K2Ht2rD X-Received: by 10.236.36.39 with SMTP id v27mr5174843yha.5.1379078574715; Fri, 13 Sep 2013 06:22:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.29.129 with SMTP id k1ls1141452qeh.75.gmail; Fri, 13 Sep 2013 06:22:54 -0700 (PDT) X-Received: by 10.52.100.202 with SMTP id fa10mr10141813vdb.0.1379078574418; Fri, 13 Sep 2013 06:22:54 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id tj1si3114330vdc.66.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:22:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id jy13so942212veb.5 for ; Fri, 13 Sep 2013 06:22:54 -0700 (PDT) X-Received: by 10.58.196.132 with SMTP id im4mr1093624vec.28.1379078574348; Fri, 13 Sep 2013 06:22: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 u4csp80474vcz; Fri, 13 Sep 2013 06:22:53 -0700 (PDT) X-Received: by 10.67.3.34 with SMTP id bt2mr15423589pad.3.1379078573121; Fri, 13 Sep 2013 06:22:53 -0700 (PDT) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id z4si668484paz.263.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:22:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.53; Received: by mail-pa0-f53.google.com with SMTP id lb1so2510483pab.40 for ; Fri, 13 Sep 2013 06:22:52 -0700 (PDT) X-Received: by 10.68.178.197 with SMTP id da5mr13635361pbc.28.1379078572716; Fri, 13 Sep 2013 06:22:52 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ry4sm18107451pab.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:22: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, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 167/228] cpufreq: pasemi: Convert to light weight ->target_index() routine Date: Fri, 13 Sep 2013 18:31:53 +0530 Message-Id: <22f63c67f0716afd1245ae5efd81c0ec6e2c7684.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.128.174 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: , This patch converts existing .target() to newly defined light weight .target_index() routine for this driver. CPUFreq core will call cpufreq_frequency_table_target() before calling this routine and will pass index to it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pasemi-cpufreq.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c index 1cca332..17424dd 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -240,19 +240,11 @@ static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) } static int pas_cpufreq_target(struct cpufreq_policy *policy, - unsigned int target_freq, - unsigned int relation) + unsigned int pas_astate_new) { struct cpufreq_freqs freqs; - int pas_astate_new; int i; - cpufreq_frequency_table_target(policy, - pas_freqs, - target_freq, - relation, - &pas_astate_new); - freqs.old = policy->cur; freqs.new = pas_freqs[pas_astate_new].frequency; @@ -282,7 +274,7 @@ static struct cpufreq_driver pas_cpufreq_driver = { .init = pas_cpufreq_cpu_init, .exit = pas_cpufreq_cpu_exit, .verify = cpufreq_generic_frequency_table_verify, - .target = pas_cpufreq_target, + .target_index = pas_cpufreq_target, .attr = cpufreq_generic_attr, };