From patchwork Mon Aug 12 17:48:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19023 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B8D63246B8 for ; Mon, 12 Aug 2013 17:51:06 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id n1sf8567155qcx.7 for ; Mon, 12 Aug 2013 10:51:06 -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=k+f5GGiykYy3krIYG6YODQ/+pioyrHzbIqBgLCsI318=; b=IhZE0y0Wwtkfvf1FOGnqlJgI0dDp1JjiBFuQxFxS654DiwfUsWChyEHbg/PQh4fEUv 66xfUcaxNscBcgP+f5mV64C+pziyBFLtqceWD5QUBJCyNJwoAxb37P33U7lXk/eIm3u8 2fHrLAOBLEXiMPKd5M7eIqUoUBxlEsO7FXNNoQPCbiXnsakNG7GxxgTn3V6XyNzoWXAF uRMvrk47wX4ELf2VKQvuu+Zq85PJ3dCDhqjLktHx4tf3ZNafxaoVN4cDwyRHZE95ePl3 IxUlLJO/A8KEGHIrgFvqVosai5zD53WoO4x9SASud5lwt+JDsaKLQpC421eqVUON2MO4 4s3g== X-Received: by 10.236.153.202 with SMTP id f50mr58460yhk.48.1376329866542; Mon, 12 Aug 2013 10:51:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.117.166 with SMTP id kf6ls2288098qeb.30.gmail; Mon, 12 Aug 2013 10:51:06 -0700 (PDT) X-Received: by 10.58.198.13 with SMTP id iy13mr156375vec.11.1376329866281; Mon, 12 Aug 2013 10:51:06 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id m10si511379vcm.57.2013.08.12.10.51.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:51:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 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.52; Received: by mail-vb0-f52.google.com with SMTP id f12so5974516vbg.11 for ; Mon, 12 Aug 2013 10:51:06 -0700 (PDT) X-Gm-Message-State: ALoCoQnsynY3RmdmKiOd7IJqNN5U4/PzFcvo6hScqekHfq/q3ihpHoYQetZU7w+q8NEo7nlJhgdD X-Received: by 10.220.109.197 with SMTP id k5mr144108vcp.54.1376329866183; Mon, 12 Aug 2013 10:51:06 -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 u4csp108218vcz; Mon, 12 Aug 2013 10:51:05 -0700 (PDT) X-Received: by 10.66.188.203 with SMTP id gc11mr243649pac.63.1376329865337; Mon, 12 Aug 2013 10:51:05 -0700 (PDT) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id gh3si1212341pbc.197.2013.08.12.10.51.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:51:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.53; Received: by mail-pa0-f53.google.com with SMTP id lb1so7821585pab.26 for ; Mon, 12 Aug 2013 10:51:05 -0700 (PDT) X-Received: by 10.68.179.65 with SMTP id de1mr247775pbc.73.1376329864916; Mon, 12 Aug 2013 10:51:04 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ys4sm38621236pbb.9.2013.08.12.10.51.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:51:04 -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 , Tony Luck Subject: [PATCH 13/31] cpufreq: ia64: Covert to light weight ->target() routine Date: Mon, 12 Aug 2013 23:18:49 +0530 Message-Id: <03b7ed274047ab208476f92b927ff2d1a9f7653b.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.212.52 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: 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 02bd69b..bb81f37 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_old = acpi_cpufreq_target, + .target = acpi_cpufreq_target, .get = acpi_cpufreq_get, .init = acpi_cpufreq_cpu_init, .exit = acpi_cpufreq_cpu_exit,