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: 2843817 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 75C659F239 for ; Tue, 13 Aug 2013 16:06:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C40CE20567 for ; Tue, 13 Aug 2013 16:06:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E64B62052B for ; Tue, 13 Aug 2013 16:06:47 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9EmT-00086V-Vx; Tue, 13 Aug 2013 13:37:02 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9Elv-000857-GC; Tue, 13 Aug 2013 13:36:27 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9Ekm-0007q8-Er for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2013 13:35:18 +0000 Received: by mail-pa0-f49.google.com with SMTP id ld10so4304819pab.8 for ; Tue, 13 Aug 2013 06:34:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=xX0GQ+yAmr9SSysPV5Mp7i2sp8SIPkBU9Uj+OMj5J9I=; b=UX0K1nIVLeRJl2hPPbBvbaJO9ITh+UPiwqFBLbPFr58G42MJVzgDjYHjvS85/n9KKl w39lVrVfEAjuSw5zUSfdtL6ulMITEt8v6jymdX+XRu40e5NHchHXyg/ZUkRk/9CzcG6O Qyeub7A2smE1KgJn6t0FAVM20jZaiErEmaTeSwb/2IMOHccz4asIqtso02RFQY9RB+rZ KBcT+3ez3TuwCO2v+jccdlpTJv/ZfoHUQH8dorBuOPEfA0EET0BYjsJUKOtu1mE6d6cS BqV5UmtdoUltCOUOKhaNydGAi/LQcDxyUO+P1YSkwv2b51zv5lrAJxM3xagE9IuubSB+ p//w== X-Gm-Message-State: ALoCoQkx7KInIVr2fqZjtuXXoWxok94L1D5CkMGcHls7E70LRAvDhNUsacdyAlAGu5wK5GKsQSbT 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130813_093516_614156_A6E66D90 X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, Tony Luck , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 --- 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,