From patchwork Fri Oct 18 13:59:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 21152 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5D970202FF for ; Fri, 18 Oct 2013 14:02:53 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id q4sf2222775qcx.2 for ; Fri, 18 Oct 2013 07:02:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; 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=3Fne24A/4u1YVt0+/kPCnFtWLI+zFd6ZFeRFQiPZQ4c=; b=kD9/kQd2zCSIs8Rvz7uq/G7Tc0bUt8Br4xfBbdjKEzvyZuPo1IJcTkbpxlTlsTCr1k JvPrLJP59ZIBU6+VlkyKLPdw9JNjI54qO/puDwcuNdHhYsNMdv30/1a4kpP/YloS9oO6 vqeb8Ja91QGgj249xskdThdcYt3hLqHUyjrtAihE0PZkffqBwz4KvWytixvNQG2QRAkg YNzS4BAi+pkKSEYz6Ms2D5joBKAVXFCNJG+9rg06cY8Bb8a2VRAwc6BcVNyhfGjVXxdc 8C86zQhQnBeN0jRsUgeOgHuB6L/KngREYnmfW/ho0kdUtKV+aQJlbhB/CJz4kgKsoHiw cQHw== X-Received: by 10.58.134.110 with SMTP id pj14mr1099604veb.14.1382104973113; Fri, 18 Oct 2013 07:02:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.133 with SMTP id h5ls1419523qej.54.gmail; Fri, 18 Oct 2013 07:02:53 -0700 (PDT) X-Received: by 10.58.161.231 with SMTP id xv7mr2195701veb.2.1382104972994; Fri, 18 Oct 2013 07:02:52 -0700 (PDT) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id ud10si334185vcb.66.2013.10.18.07.02.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 07:02:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.44 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.44; Received: by mail-vb0-f44.google.com with SMTP id 11so237967vbe.31 for ; Fri, 18 Oct 2013 07:02:52 -0700 (PDT) X-Gm-Message-State: ALoCoQnGzxudKJKCi/FsCLX/CrDVJE/+eWB3tV3M31AuFy9lL6aavfts5rytHx6koN5dDV8QuFRD X-Received: by 10.58.210.234 with SMTP id mx10mr2238685vec.9.1382104972900; Fri, 18 Oct 2013 07:02:52 -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 u4csp38075vcz; Fri, 18 Oct 2013 07:02:52 -0700 (PDT) X-Received: by 10.68.48.166 with SMTP id m6mr3147732pbn.105.1382104971788; Fri, 18 Oct 2013 07:02:51 -0700 (PDT) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by mx.google.com with ESMTPS id hi3si980582pbb.243.2013.10.18.07.02.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 07:02:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.177 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.177; Received: by mail-pd0-f177.google.com with SMTP id p10so2369778pdj.22 for ; Fri, 18 Oct 2013 07:02:51 -0700 (PDT) X-Received: by 10.67.30.70 with SMTP id kc6mr3739731pad.32.1382104971350; Fri, 18 Oct 2013 07:02:51 -0700 (PDT) Received: from localhost ([120.56.197.189]) by mx.google.com with ESMTPSA id tz3sm2631833pbc.20.2013.10.18.07.02.47 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 18 Oct 2013 07:02:50 -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 V2 Resend 21/34] cpufreq: pasemi: Convert to light weight ->target_index() routine Date: Fri, 18 Oct 2013 19:29:44 +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.44 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, };