From patchwork Mon Aug 12 17:48:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19026 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f197.google.com (mail-ye0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 06DDF246B8 for ; Mon, 12 Aug 2013 17:51:28 +0000 (UTC) Received: by mail-ye0-f197.google.com with SMTP id q8sf3762912yen.8 for ; Mon, 12 Aug 2013 10:51:27 -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=7Mt5DNa59zZ4qU+3fStnMTSBU4KaR49Dn0fm3+EpEsc=; b=AXEXDb3eNy1vpYvS7vpsTVEXcCq+pkc3WsOBPkWbz0MfO3ndhSWJR3LD4b/tFonhSj m0z5hEor4+w9EPfwTuJSOW4PSOL5xy07SyvDAHX23WqBGma2EAC9tDBOUceM+CdLSUvC rVae7hNAWFdbPwhShnYkv2kOCqM9GmWYTsqPAPEVelHVeMUskrhDpNtm54lMsn4TJ/2n YIcx5GdKtGizLAN43LyndYMQ1RAUfTdP/dm37T1vxV9wXsg6DgvKGLzbuIhjNGYjvBgt FwHX11jtKJ9nn0vimZvZKPEx3GULdJbXQUomZf+D6B4EZl+3tOywHGB1rEd7IDqw+LnC 182A== X-Received: by 10.236.125.200 with SMTP id z48mr60577yhh.55.1376329887744; Mon, 12 Aug 2013 10:51:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.109.35 with SMTP id hp3ls2278977qeb.76.gmail; Mon, 12 Aug 2013 10:51:27 -0700 (PDT) X-Received: by 10.58.199.133 with SMTP id jk5mr143937vec.63.1376329887466; Mon, 12 Aug 2013 10:51:27 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id vg3si8586113vec.100.2013.08.12.10.51.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:51:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 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.170; Received: by mail-vc0-f170.google.com with SMTP id kw10so3053255vcb.15 for ; Mon, 12 Aug 2013 10:51:27 -0700 (PDT) X-Gm-Message-State: ALoCoQkg0i1YaiFJW7J30U8VcBFD4tbwW0cg22ZYkSJHxtOv/sQ3j23hUWNU5Gk4VqVZ/NwdNbFC X-Received: by 10.52.30.97 with SMTP id r1mr125849vdh.36.1376329887367; Mon, 12 Aug 2013 10:51:27 -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 u4csp108238vcz; Mon, 12 Aug 2013 10:51:26 -0700 (PDT) X-Received: by 10.68.224.161 with SMTP id rd1mr241769pbc.121.1376329886247; Mon, 12 Aug 2013 10:51:26 -0700 (PDT) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx.google.com with ESMTPS id pn6si22151761pbb.261.2013.08.12.10.51.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:51:26 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.178 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id w10so3699293pde.23 for ; Mon, 12 Aug 2013 10:51:25 -0700 (PDT) X-Received: by 10.68.203.105 with SMTP id kp9mr250692pbc.78.1376329885852; Mon, 12 Aug 2013 10:51:25 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ot4sm41365874pac.17.2013.08.12.10.51.22 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:51:25 -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 16/31] cpufreq: longhaul: Covert to light weight ->target() routine Date: Mon, 12 Aug 2013 23:18:52 +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.220.170 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/longhaul.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index 9509ab9..2de667b 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c @@ -626,21 +626,12 @@ static void longhaul_setup_voltagescaling(void) static int longhaul_target(struct cpufreq_policy *policy, - unsigned int target_freq, unsigned int relation) + unsigned int table_index) { - unsigned int table_index = 0; unsigned int i; unsigned int dir = 0; u8 vid, current_vid; - if (cpufreq_frequency_table_target(policy, longhaul_table, target_freq, - relation, &table_index)) - return -EINVAL; - - /* Don't set same frequency again */ - if (longhaul_index == table_index) - return 0; - if (!can_scale_voltage) longhaul_setstate(policy, table_index); else { @@ -920,7 +911,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) static struct cpufreq_driver longhaul_driver = { .verify = cpufreq_generic_frequency_table_verify, - .target_old = longhaul_target, + .target = longhaul_target, .get = longhaul_get, .init = longhaul_cpu_init, .exit = cpufreq_generic_exit,