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: 21144 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 55B61202FF for ; Fri, 18 Oct 2013 14:01:54 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f64sf7873329yha.6 for ; Fri, 18 Oct 2013 07:01:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; 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=rjkH7oiBvkYe7W5EGNfrPwqHTYNxw9sV5qGzWYRUIys=; b=HtJ/KElVRMtELfzRL7GyxBFFfa5YMmcqh2UHHzexA9hq1zvZ+ztDpsspxUifgRMmg7 ZIQ9ooQp84SX37h/sfFN6SSn1LZGo+7wXbNhY7gX7/zVD9GyqT+PohQfbaDgsDHaUNiS y6jpZ7Hkj0tYqXZE3zCEqkl4gQuNXh9nnFCj/F31EaTfeXZYSfiM2KxhHQwcDfXdJWxD L7N+Tgq09Mgshzi6aYXCDM+8pcXIlLfIxihL+8hgFhMDxQkKSCb4sxd/S4FXTBLYNUxM qa99tjk+R1qhXuzNeJDP7dGYGU7bIgsnuhQEfhhR7WkS8jcS61tKXXAYPNLnQU51LV/H xESA== X-Received: by 10.58.39.202 with SMTP id r10mr1200545vek.12.1382104914128; Fri, 18 Oct 2013 07:01:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.98.99 with SMTP id eh3ls1357254qeb.68.gmail; Fri, 18 Oct 2013 07:01:54 -0700 (PDT) X-Received: by 10.52.69.204 with SMTP id g12mr618260vdu.26.1382104914001; Fri, 18 Oct 2013 07:01:54 -0700 (PDT) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id xt2si328797vcb.108.2013.10.18.07.01.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 07:01:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.54 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.54; Received: by mail-vb0-f54.google.com with SMTP id q14so1922001vbe.13 for ; Fri, 18 Oct 2013 07:01:53 -0700 (PDT) X-Gm-Message-State: ALoCoQnEwetdjz7eN+WlsNj4Gx321NWu1ACftoKBrU5fjcFKw//hy9ICe3ytmIQSw4FUKwIa2C5g X-Received: by 10.58.210.66 with SMTP id ms2mr2253058vec.10.1382104913924; Fri, 18 Oct 2013 07:01:53 -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 u4csp37986vcz; Fri, 18 Oct 2013 07:01:53 -0700 (PDT) X-Received: by 10.68.240.33 with SMTP id vx1mr3341327pbc.12.1382104912963; Fri, 18 Oct 2013 07:01:52 -0700 (PDT) Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by mx.google.com with ESMTPS id ll9si1565993pab.211.2013.10.18.07.01.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 07:01:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.49 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.49; Received: by mail-pb0-f49.google.com with SMTP id xb12so3866515pbc.22 for ; Fri, 18 Oct 2013 07:01:52 -0700 (PDT) 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: 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.54 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 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,