From patchwork Fri Sep 13 13:00:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20121 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f71.google.com (mail-vb0-f71.google.com [209.85.212.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 586A920358 for ; Fri, 13 Sep 2013 13:10:59 +0000 (UTC) Received: by mail-vb0-f71.google.com with SMTP id g17sf1190848vbg.2 for ; Fri, 13 Sep 2013 06:10:59 -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=TNEr7e2kqlAjpm5cMV3bPN0oJfyr3QXqja2/010MlxE=; b=K1Luu1fwM4YiSpbAXMtQq5BJ6cZj9CPI4QWZHW0CObpc8uPLdGY0ir9RWfr8vtUh7x yoKRFO7c3HLCeor8lHZPpHpyD8/CaAVWkJHAxRnHHCHzGIpE6PECoZ/BYJw70C1A/G3n dmIDLvp6EurrUCXZWmQbPZGidiCybR7s7RmYdFLOpVyfHBGxmGJFAAA2B4ZS1yMu28i+ q4k737AZv1397ruRYaF/AqnsfzIpE7S/MhizoDlUZ0iwpXVuN+/aZndYxx/FMKnqt5ah g8gmLp+nySkUAPQl2A9H7kF/0137P/WAjOVuCDbiTeLAvz5rtsI1R9aYjG0q/xlj1HzW Y1BQ== X-Gm-Message-State: ALoCoQnMGA3/c38OBBK2IBT0q8V5A+p1r65TRfr1kHEEtL6gbiAmPXOqHR3WlAensOAYZ4863+AG X-Received: by 10.236.63.165 with SMTP id a25mr4981200yhd.43.1379077859085; Fri, 13 Sep 2013 06:10:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.30.35 with SMTP id p3ls1130761qeh.97.gmail; Fri, 13 Sep 2013 06:10:58 -0700 (PDT) X-Received: by 10.220.144.68 with SMTP id y4mr752763vcu.28.1379077858885; Fri, 13 Sep 2013 06:10:58 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id bz3si3092061vcb.123.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ha12so883252vcb.23 for ; Fri, 13 Sep 2013 06:10:58 -0700 (PDT) X-Received: by 10.220.11.7 with SMTP id r7mr12009041vcr.12.1379077858801; Fri, 13 Sep 2013 06:10:58 -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 u4csp79847vcz; Fri, 13 Sep 2013 06:10:58 -0700 (PDT) X-Received: by 10.68.217.196 with SMTP id pa4mr13379362pbc.117.1379077857958; Fri, 13 Sep 2013 06:10:57 -0700 (PDT) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) by mx.google.com with ESMTPS id fl1si11192253pab.141.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.45 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.45; Received: by mail-pb0-f45.google.com with SMTP id mc17so1212583pbc.32 for ; Fri, 13 Sep 2013 06:10:57 -0700 (PDT) X-Received: by 10.66.156.199 with SMTP id wg7mr15088580pab.81.1379077857544; Fri, 13 Sep 2013 06:10:57 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id in2sm11664866pbc.37.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:57 -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 067/228] cpufreq: ia64-acpi: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:13 +0530 Message-Id: <770e811f81692f1321bd0fb8254f0f4a1b8671ff.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.220.178 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: , Most of the CPUFreq drivers do similar things in .exit() and .verify() routines and .attr. So its better if we have generic routines for them which can be used by cpufreq drivers then. This patch uses these generic routines for this driver. Cc: Tony Luck Signed-off-by: Viresh Kumar --- drivers/cpufreq/ia64-acpi-cpufreq.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index 6cfad51..b958bdb 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c @@ -248,22 +248,6 @@ acpi_cpufreq_target ( static int -acpi_cpufreq_verify ( - struct cpufreq_policy *policy) -{ - unsigned int result = 0; - struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu]; - - pr_debug("acpi_cpufreq_verify\n"); - - result = cpufreq_frequency_table_verify(policy, - data->freq_table); - - return (result); -} - - -static int acpi_cpufreq_cpu_init ( struct cpufreq_policy *policy) { @@ -394,20 +378,14 @@ acpi_cpufreq_cpu_exit ( } -static struct freq_attr* acpi_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - - static struct cpufreq_driver acpi_cpufreq_driver = { - .verify = acpi_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = acpi_cpufreq_target, .get = acpi_cpufreq_get, .init = acpi_cpufreq_cpu_init, .exit = acpi_cpufreq_cpu_exit, .name = "acpi-cpufreq", - .attr = acpi_cpufreq_attr, + .attr = cpufreq_generic_attr, };