From patchwork Sat Aug 10 06:44:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18953 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8E677246EB for ; Sat, 10 Aug 2013 06:50:20 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id ox1sf519201veb.8 for ; Fri, 09 Aug 2013 23:50:20 -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=TNEr7e2kqlAjpm5cMV3bPN0oJfyr3QXqja2/010MlxE=; b=j1o8fef5n2VscIOVA9KDz1JN9qxBrWV20BdKzLI+4voXMwq/e0ahYQdc2+AFw+8hph KNSQG7mf5MwiKCUEDbUDgheQDvgh98iEcsi1GQOet+/bceyj0R1r6QIi79Vuwt9qqH78 KgRy6RcWQW6TFnAE/EOczuSq8f+mX7x0ACWpY0KGElvVOsvYQ0wEbEBufZ2cb33cVBou gR6J/jMOYKLpk75H7rGRrzmH7nIgUG1nf2VjJ2/evtCd7oPSxgATSNmpQ5vR88mqYao7 5FUN4o31BlINQH9zz+9YXvOrVqrXxwvSfDMBC1sFjRSemQXqT0/C2IbWIgFwVED1U+Bv Et3A== X-Received: by 10.224.103.68 with SMTP id j4mr15883100qao.8.1376117420304; Fri, 09 Aug 2013 23:50:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.2 with SMTP id s2ls1702778qed.18.gmail; Fri, 09 Aug 2013 23:50:20 -0700 (PDT) X-Received: by 10.58.97.138 with SMTP id ea10mr2218924veb.38.1376117420173; Fri, 09 Aug 2013 23:50:20 -0700 (PDT) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id c13si5676179veu.115.2013.08.09.23.50.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:50:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.49 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.49; Received: by mail-vb0-f49.google.com with SMTP id w16so4556636vbb.22 for ; Fri, 09 Aug 2013 23:50:20 -0700 (PDT) X-Gm-Message-State: ALoCoQkjnmmzBtH5RfQzN4G/qS2SR9ewgG11tTKPqYcdkUz9auzIrV/sp0gPjbC775aeaEH/rJp5 X-Received: by 10.52.117.208 with SMTP id kg16mr6592850vdb.48.1376117419974; Fri, 09 Aug 2013 23:50:19 -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 u4csp164vcz; Fri, 9 Aug 2013 23:50:19 -0700 (PDT) X-Received: by 10.66.176.143 with SMTP id ci15mr14621462pac.146.1376117419000; Fri, 09 Aug 2013 23:50:19 -0700 (PDT) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by mx.google.com with ESMTPS id tw4si14662395pbc.61.2013.08.09.23.50.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:50:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.44 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.44; Received: by mail-pb0-f44.google.com with SMTP id xa7so5229650pbc.17 for ; Fri, 09 Aug 2013 23:50:18 -0700 (PDT) X-Received: by 10.68.59.73 with SMTP id x9mr14982437pbq.131.1376117418628; Fri, 09 Aug 2013 23:50:18 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id nj9sm24172279pbc.13.2013.08.09.23.50.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:50:18 -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 20/44] cpufreq: ia64-acpi: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:16 +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.49 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, };