From patchwork Fri Sep 13 13:01:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20213 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 BD88320358 for ; Fri, 13 Sep 2013 13:21:47 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf1205395vbg.0 for ; Fri, 13 Sep 2013 06:21:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=rjkH7oiBvkYe7W5EGNfrPwqHTYNxw9sV5qGzWYRUIys=; b=TT19SVUGYm8WUlfXe+FPGs24Ym+ghA2iPoMP0ODX85yYUOK74qqouHrWehqb6gxKqf e0L8GhX1Yc0k112YeQ5F2yM1bNHWAisxGHRWtNuuQvifLl2bn0i2e4ZKOwQT3VX8sJqv F7kt4YnubLLr8UvHq5P1n7Xj/2VjdlAOdLfDJFiRvWSxrUXkQJetKKWi9N2ry6KrTcvO VfhCi5tTgqDNpdxIOS9qp+9KZQflL6K092BBPwp2fML86MaClRFDwzY7A+SwN3coLTCW a6hQNm5oTZNUVL3g6QgQ+bZsjDYuAs2Nuke9uSVbkuPbnQjWcP8kzYQ3+1uEFzMBLcrl POkg== X-Gm-Message-State: ALoCoQlmKjudrJCBmyzmzDvlN5xx+/j1Amgs+nNdJj01YKqaHKDLN9NxeQ91pJbjVLqj2eIEQydo X-Received: by 10.236.207.103 with SMTP id m67mr5023108yho.1.1379078507512; Fri, 13 Sep 2013 06:21:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.41 with SMTP id i9ls1105944qen.44.gmail; Fri, 13 Sep 2013 06:21:47 -0700 (PDT) X-Received: by 10.52.170.136 with SMTP id am8mr944263vdc.33.1379078507268; Fri, 13 Sep 2013 06:21:47 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id ee5si3115955vec.78.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:21:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 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.48; Received: by mail-vb0-f48.google.com with SMTP id w16so889760vbf.21 for ; Fri, 13 Sep 2013 06:21:47 -0700 (PDT) X-Received: by 10.58.75.131 with SMTP id c3mr8542644vew.12.1379078507191; Fri, 13 Sep 2013 06:21:47 -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 u4csp80416vcz; Fri, 13 Sep 2013 06:21:46 -0700 (PDT) X-Received: by 10.68.198.68 with SMTP id ja4mr13468044pbc.24.1379078506352; Fri, 13 Sep 2013 06:21:46 -0700 (PDT) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by mx.google.com with ESMTPS id gl2si7485856pbc.18.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:21:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.42 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.42; Received: by mail-pb0-f42.google.com with SMTP id un15so1238431pbc.15 for ; Fri, 13 Sep 2013 06:21:46 -0700 (PDT) X-Received: by 10.66.65.195 with SMTP id z3mr8773133pas.47.1379078505962; Fri, 13 Sep 2013 06:21:45 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id bb1sm11755246pbc.10.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:21:45 -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 159/228] cpufreq: ia64: Convert to light weight ->target_index() routine Date: Fri, 13 Sep 2013 18:31:45 +0530 Message-Id: <1c9b241efbaa456013cc6b484bb17d9353aef340.1379063063.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.212.48 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 90c6598..4695fa2 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) @@ -379,7 +364,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,