From patchwork Tue Aug 13 13:32:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19069 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A3B51246B8 for ; Tue, 13 Aug 2013 13:34:56 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf222367vbg.4 for ; Tue, 13 Aug 2013 06:34:56 -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=xX0GQ+yAmr9SSysPV5Mp7i2sp8SIPkBU9Uj+OMj5J9I=; b=kAIaS6Cerxir0cuKiQXZ9OF/I/mEhNKal+bSTAhXw5B63jiYwuOwam7COh/cctILPr /l/GbdiRLAO6ItyaHxQ1PUK0iKOvHDCTOyf35O9GjNLLJnijlbkdq4UmEgdySLR5dYBA FHyQt57Mu0IDDPLL8sj0XPg4uFbfGeTqV0o6IeGkd9g4GOl0GSnEULJGvz/TtrAmT8q1 XEAtE8xTpphQQCxOpA/orAQjy4HG/TZLpPAkS9i8HWlCef1Mt9L302VGU5Sy/7p24Fi+ IGPEZEuOSV/V7FecT9jyFgIFH+NG0sGjhmcZOMxqRSXBuhdqgKz1Q2YpdtLfxiphOp0p fgjg== X-Received: by 10.236.169.196 with SMTP id n44mr1766068yhl.9.1376400896365; Tue, 13 Aug 2013 06:34:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.81.244 with SMTP id d20ls2835342qey.38.gmail; Tue, 13 Aug 2013 06:34:56 -0700 (PDT) X-Received: by 10.58.217.167 with SMTP id oz7mr4468968vec.15.1376400896062; Tue, 13 Aug 2013 06:34:56 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id uw3si9745701vec.96.2013.08.13.06.34.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Aug 2013 06:34:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so3896558vcb.28 for ; Tue, 13 Aug 2013 06:34:56 -0700 (PDT) X-Gm-Message-State: ALoCoQm3mVwWE/+gb1Th/6yEtllT6ftLLUDay2Ua8YHjgdVYIYOfcKuulgQ9vMlGm2+n5QFY4/Ym X-Received: by 10.58.155.68 with SMTP id vu4mr4502454veb.21.1376400895979; Tue, 13 Aug 2013 06:34: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 u4csp154194vcz; Tue, 13 Aug 2013 06:34:55 -0700 (PDT) X-Received: by 10.66.187.34 with SMTP id fp2mr4596799pac.12.1376400895126; Tue, 13 Aug 2013 06:34:55 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id zo4si25123832pbc.132.2013.08.13.06.34.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Aug 2013 06:34:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id p10so4895131pdj.4 for ; Tue, 13 Aug 2013 06:34:54 -0700 (PDT) X-Received: by 10.68.106.99 with SMTP id gt3mr4662102pbb.116.1376400894730; Tue, 13 Aug 2013 06:34:54 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id iu10sm5043647pac.18.2013.08.13.06.34.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 13 Aug 2013 06:34:54 -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 , Tony Luck Subject: [PATCH V2 14/35] cpufreq: ia64: Covert to light weight ->target_index() routine Date: Tue, 13 Aug 2013 19:02:27 +0530 Message-Id: <68f0e910b21a30610a0b3823c469922962ef187c.1376392602.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.169 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. Cc: Tony Luck Signed-off-by: Viresh Kumar --- drivers/cpufreq/ia64-acpi-cpufreq.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index b958bdb..371c63d 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c @@ -227,26 +227,11 @@ acpi_cpufreq_get ( static int acpi_cpufreq_target ( struct cpufreq_policy *policy, - unsigned int target_freq, - unsigned int relation) + unsigned int index) { - struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu]; - unsigned int next_state = 0; - unsigned int result = 0; - - pr_debug("acpi_cpufreq_setpolicy\n"); - - result = cpufreq_frequency_table_target(policy, - data->freq_table, target_freq, relation, &next_state); - if (result) - return (result); - - result = processor_set_freq(data, policy, next_state); - - return (result); + return processor_set_freq(acpi_io_data[policy->cpu], policy, index); } - static int acpi_cpufreq_cpu_init ( struct cpufreq_policy *policy) @@ -380,7 +365,7 @@ acpi_cpufreq_cpu_exit ( static struct cpufreq_driver acpi_cpufreq_driver = { .verify = cpufreq_generic_frequency_table_verify, - .target = acpi_cpufreq_target, + .target_index = acpi_cpufreq_target, .get = acpi_cpufreq_get, .init = acpi_cpufreq_cpu_init, .exit = acpi_cpufreq_cpu_exit,