From patchwork Fri Oct 18 13:59:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 3067621 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9046CBF924 for ; Fri, 18 Oct 2013 14:08:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 648C02039A for ; Fri, 18 Oct 2013 14:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D0ED204E1 for ; Fri, 18 Oct 2013 14:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755492Ab3JROBz (ORCPT ); Fri, 18 Oct 2013 10:01:55 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:42919 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755480Ab3JROBx (ORCPT ); Fri, 18 Oct 2013 10:01:53 -0400 Received: by mail-pd0-f170.google.com with SMTP id x10so4730371pdj.1 for ; Fri, 18 Oct 2013 07:01:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=rjkH7oiBvkYe7W5EGNfrPwqHTYNxw9sV5qGzWYRUIys=; b=YMq3a13VUsd3ZPShS6BlOgQ+CAfTo1lrjO4/T0RtUIjF1VOME+pate2ixCHIF6JPeX HcV9P4EgSo3VeninDdODusUtagOBwoJKg5w3gFOjVEeQLrqbv9DB8WwZsnhgeXYvdAAx SnFx+HqAHXTHfxKS2lsGMhhzFcMjdBVy9EF3S018yulTC4Ur8ylHtgA+yqsPIWP5cbel 3ybn8Tq3K0GsM35EZa+xzIMJeyEGGZ07TIdRno5uo2M4rCsIzAuJYgJotgOOAy+BYhvy o1csFu6ABKLYNgRxQWEVthsmRw1ycyRSzA1VJ4X4pGtA6gpM7DwLUXg0FJvtxhVZ87yL Wg2g== X-Gm-Message-State: ALoCoQlCy48XawXTWsnGnxZeM7gxMaRCMSEbxorvxGk3vMB4bfjWpPzDHh3Fn5JHR3wpfmuDe6UG X-Received: by 10.68.218.68 with SMTP id pe4mr2546846pbc.181.1382104912376; Fri, 18 Oct 2013 07:01:52 -0700 (PDT) Received: from localhost ([120.56.197.189]) by mx.google.com with ESMTPSA id yo2sm4633249pab.8.2013.10.18.07.01.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 18 Oct 2013 07:01:51 -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 V2 Resend 13/34] cpufreq: ia64: Convert to light weight ->target_index() routine Date: Fri, 18 Oct 2013 19:29:36 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Tony Luck --- 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,