From patchwork Mon Aug 12 17:49:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19041 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E449E246B8 for ; Mon, 12 Aug 2013 17:53:12 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f64sf8317570yha.10 for ; Mon, 12 Aug 2013 10:53:12 -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=2DAzI2xEE4eEL6+afBQB4YwFiXD3zG1xUdgiCuIrF4g=; b=ZZQ793XObkTGFnVgzHZeemZ/B/g+NeHAA632rsEqHchMdggB9udtMZX+4PpPqD877x sq1DG3M+f18aEgBRhmmD2CIZm41le9JkwumEKCv6sRsRZLGMpauIwbxmzawJppSmfxqX ADq+9fOW9BaJ3sjWn5t1cvP33AdnkmOmqZh3r/6MnSLffUcMZX3cGHnxKA+WFHw90zVx H7v+CDgq8ILVy/p7yEAFmPFmMj0QdKebEJcsd5RVBXNSLguWvZ+szDQ8F4KW4SBvGWNo z756UvlmuVrmTdn2W8czPRCTn0EVW+Ni2J9SUSaFUr2Pv4RXDTs4fAde2byq/mrQTwPD pFig== X-Received: by 10.236.220.5 with SMTP id n5mr70030yhp.21.1376329992698; Mon, 12 Aug 2013 10:53:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.117.129 with SMTP id ke1ls2247117qeb.88.gmail; Mon, 12 Aug 2013 10:53:12 -0700 (PDT) X-Received: by 10.220.171.129 with SMTP id h1mr156209vcz.28.1376329992542; Mon, 12 Aug 2013 10:53:12 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id x9si8586287vec.118.2013.08.12.10.53.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:53:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id ht10so3048520vcb.38 for ; Mon, 12 Aug 2013 10:53:12 -0700 (PDT) X-Gm-Message-State: ALoCoQk/IM+zjjMJ3PkduvW6S5Id9IIvfg+FfW4GqAcfX6bmhvs2MWeHd9f6pJ2/60+UgH1LIsuY X-Received: by 10.52.30.48 with SMTP id p16mr133593vdh.25.1376329992469; Mon, 12 Aug 2013 10:53:12 -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 u4csp108339vcz; Mon, 12 Aug 2013 10:53:11 -0700 (PDT) X-Received: by 10.68.191.231 with SMTP id hb7mr249291pbc.82.1376329991612; Mon, 12 Aug 2013 10:53:11 -0700 (PDT) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx.google.com with ESMTPS id dz4si22183475pbc.149.2013.08.12.10.53.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:53:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.46; Received: by mail-pa0-f46.google.com with SMTP id fa1so7871039pad.33 for ; Mon, 12 Aug 2013 10:53:11 -0700 (PDT) X-Received: by 10.66.234.232 with SMTP id uh8mr230638pac.155.1376329991219; Mon, 12 Aug 2013 10:53:11 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id qp10sm41381146pab.13.2013.08.12.10.53.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:53:10 -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 , Stephen Warren Subject: [PATCH 31/31] cpufreq: tegra: Covert to light weight ->target() routine Date: Mon, 12 Aug 2013 23:19:07 +0530 Message-Id: <9c073ba7dc318e2781573bb59ec307d79dccd4dc.1376329128.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.220.179 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. Cc: Stephen Warren Signed-off-by: Viresh Kumar --- drivers/cpufreq/tegra-cpufreq.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c index 3c63323..67647a6 100644 --- a/drivers/cpufreq/tegra-cpufreq.c +++ b/drivers/cpufreq/tegra-cpufreq.c @@ -150,11 +150,8 @@ static unsigned long tegra_cpu_highest_speed(void) return rate; } -static int tegra_target(struct cpufreq_policy *policy, - unsigned int target_freq, - unsigned int relation) +static int tegra_target(struct cpufreq_policy *policy, unsigned int index) { - unsigned int idx; unsigned int freq; int ret = 0; @@ -165,10 +162,7 @@ static int tegra_target(struct cpufreq_policy *policy, goto out; } - cpufreq_frequency_table_target(policy, freq_table, target_freq, - relation, &idx); - - freq = freq_table[idx].frequency; + freq = freq_table[index].frequency; target_cpu_speed[policy->cpu] = freq; @@ -234,7 +228,7 @@ static int tegra_cpu_exit(struct cpufreq_policy *policy) static struct cpufreq_driver tegra_cpufreq_driver = { .verify = cpufreq_generic_frequency_table_verify, - .target_old = tegra_target, + .target = tegra_target, .get = tegra_getspeed, .init = tegra_cpu_init, .exit = tegra_cpu_exit,