From patchwork Mon Aug 12 17:48:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19031 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f69.google.com (mail-qe0-f69.google.com [209.85.128.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 60141246B8 for ; Mon, 12 Aug 2013 17:52:02 +0000 (UTC) Received: by mail-qe0-f69.google.com with SMTP id 1sf6280825qec.0 for ; Mon, 12 Aug 2013 10:52: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=R5nQietnWLunuM24mC2+Ic6RHmdRoA6AclC9tIhWSR4=; b=KB9qz1zkvkJD4DMzb5IPMv7ngnc2mlY5APWkveP05vwz0jrDVQ67bOvYdDsXJt3gnS +k5MTbDaCdUhYtNDdN0TMGIjy1Z6q02k70OD7PROGarqMsROVumxVZkV0nxNrAHtAziT A/DaglE2NkgjU4+QfQZUn0Q6/XK3Cjptwbjhsp0w2g6D4NwtcgTHt1pCKUSnR2bt9vGV Hyk/2Acag+wA/X6KiRuv/7SOmz+/r7dPc1C3GvVCenoXgvnfLaf3YBkQKzwvuTi/sgVU /W/mwOC+/RRu24GTGgjV2S2YS4NfwZRDKh/NEDPt6BvTkjv9Oat5S5efTfHnwQHc+6aQ a9NA== X-Received: by 10.236.88.231 with SMTP id a67mr62671yhf.39.1376329922190; Mon, 12 Aug 2013 10:52:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.29.129 with SMTP id k1ls271967qeh.75.gmail; Mon, 12 Aug 2013 10:52:02 -0700 (PDT) X-Received: by 10.58.97.199 with SMTP id ec7mr144104veb.72.1376329921980; Mon, 12 Aug 2013 10:52:01 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id b1si8586981veg.99.2013.08.12.10.52.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:52:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 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.50; Received: by mail-vb0-f50.google.com with SMTP id x14so5919168vbb.23 for ; Mon, 12 Aug 2013 10:52:01 -0700 (PDT) X-Gm-Message-State: ALoCoQlfHSfCM1BW76dTN3IBKHS/dQnxLl1y9JMPMKgk/wvD3IBnX5hpPDp2xeBKON9rRlbm2wFw X-Received: by 10.58.217.167 with SMTP id oz7mr156250vec.15.1376329921892; Mon, 12 Aug 2013 10:52:01 -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 u4csp108276vcz; Mon, 12 Aug 2013 10:52:01 -0700 (PDT) X-Received: by 10.68.111.129 with SMTP id ii1mr252190pbb.95.1376329920993; Mon, 12 Aug 2013 10:52:00 -0700 (PDT) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by mx.google.com with ESMTPS id hk5si1454508pac.67.2013.08.12.10.52.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:52:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.51 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.51; Received: by mail-pa0-f51.google.com with SMTP id lf1so4956155pab.38 for ; Mon, 12 Aug 2013 10:52:00 -0700 (PDT) X-Received: by 10.68.177.196 with SMTP id cs4mr255040pbc.45.1376329920609; Mon, 12 Aug 2013 10:52:00 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id bg3sm38570740pbb.44.2013.08.12.10.51.57 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:52: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 Subject: [PATCH 21/31] cpufreq: pasemi: Covert to light weight ->target() routine Date: Mon, 12 Aug 2013 23:18:57 +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.50 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_old() to newly defined light weight .target() 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 3b28345..02f8b7a 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -247,19 +247,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; @@ -289,7 +281,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_old = pas_cpufreq_target, + .target = pas_cpufreq_target, .attr = cpufreq_generic_attr, };