From patchwork Tue Aug 13 13:32:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19077 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B0E41246B8 for ; Tue, 13 Aug 2013 13:35:55 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r13sf693124ghr.5 for ; Tue, 13 Aug 2013 06:35:55 -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=SAUiOclBd0DAMK6JZH8VhVBERfu+QdbmGajGDG4naog=; b=XzG596nyzW15yg8+5e1Z4VrwmvvRLij75WPH29fUde/xBBOuWf5e4g1/vwr9QMk4gq Hfd7pHrEHHSPwbgAve6+76ig0r4nmWWlX3l5eLNzTKfKS6rC1HGQxpFnXljuNxqiuz9a R0aNHOsZKgQsP0pptjWzjXmHfMcmMeEYeE8wTNW60+AJiIqfPuPiV62iW+0jap1diArx 6TIyTlmHY9gl8TgYz+SZV+asEbxJG/ozbMzHIMoVZrII43kOwKeCeTkX7jzaRQLppQtE m3W7vljI87Xg+SuY67UFyfkyv3eJBJnCPhyl2fzC230veJxSlX1TwSUDn9tUNwZ/CoYH Swfg== X-Received: by 10.236.44.140 with SMTP id n12mr1682120yhb.6.1376400955339; Tue, 13 Aug 2013 06:35:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.197 with SMTP id q5ls2732599qed.93.gmail; Tue, 13 Aug 2013 06:35:55 -0700 (PDT) X-Received: by 10.220.174.200 with SMTP id u8mr4493354vcz.6.1376400955156; Tue, 13 Aug 2013 06:35:55 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id cx7si9743808vcb.121.2013.08.13.06.35.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Aug 2013 06:35:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 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.182; Received: by mail-vc0-f182.google.com with SMTP id hf12so3813191vcb.41 for ; Tue, 13 Aug 2013 06:35:55 -0700 (PDT) X-Gm-Message-State: ALoCoQlxPaHuJI8zamT9YntbMkLWjOP0IPgUU9HrBWj0kp5VRd6fO6ZJwZr9KFIcUP5H2Hy7GkhZ X-Received: by 10.220.13.15 with SMTP id z15mr550755vcz.46.1376400955073; Tue, 13 Aug 2013 06:35:55 -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 u4csp154244vcz; Tue, 13 Aug 2013 06:35:54 -0700 (PDT) X-Received: by 10.66.188.203 with SMTP id gc11mr4556914pac.63.1376400954170; Tue, 13 Aug 2013 06:35:54 -0700 (PDT) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id hg4si25119129pbc.165.2013.08.13.06.35.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Aug 2013 06:35:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.42; Received: by mail-pa0-f42.google.com with SMTP id lj1so8799612pab.1 for ; Tue, 13 Aug 2013 06:35:53 -0700 (PDT) X-Received: by 10.68.58.97 with SMTP id p1mr4686446pbq.144.1376400953665; Tue, 13 Aug 2013 06:35:53 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id jf4sm44005402pbb.19.2013.08.13.06.35.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 13 Aug 2013 06:35:53 -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 V2 22/35] cpufreq: pasemi: Covert to light weight ->target_index() routine Date: Tue, 13 Aug 2013 19:02:35 +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.182 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 16f2508..aaee5fa 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 = pas_cpufreq_target, + .target_index = pas_cpufreq_target, .attr = cpufreq_generic_attr, };