From patchwork Fri Sep 13 13:00:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20132 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D6C4920358 for ; Fri, 13 Sep 2013 13:12:16 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id db12sf1227544veb.6 for ; Fri, 13 Sep 2013 06:12:16 -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=wB/XKsXNNHLFPl0mNGOL7VCRnZXeFkRZSJ8GuFhftA4=; b=B5zNXyfrJUaY7dkt3tNRN+Pv/LHrwTFbDakAret1IbQWBBkG6Bg1ILMj/uT1G3ipNq MrpVckbRaJ4pbn3hfB3aOSRhuVQRGEqXVM9k5/DhNoza74WPEPC74UYEFgmMf5wNV1om eQvcQWk9diTezNPdrKoQbJOqLow8o1TQ2e/RXXmvilLAJlg6qw/VyRPBNhq+7E4Bt/07 q7TuN3ZOOURwwn57cPAoL8UKzu8d7YNGcaQlJlaU6mArLlZgglsyvrNfFKWzkwATLpZ5 vBc8lmUXNypMfrt8TYZKaY41pdaWRf7aQidkPBlfpTF/B1uFLZF8O1HIKztIFNsYI60d ZAAQ== X-Gm-Message-State: ALoCoQlz2NCJvd6euKFUmrBq7nHGbFygOrIpyQHHO+aZVSb7+GvU1Jidv7LQUMzCKX7pVQxi83lQ X-Received: by 10.236.52.228 with SMTP id e64mr4819741yhc.45.1379077936600; Fri, 13 Sep 2013 06:12:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.119.9 with SMTP id kq9ls1150649qeb.48.gmail; Fri, 13 Sep 2013 06:12:16 -0700 (PDT) X-Received: by 10.58.46.229 with SMTP id y5mr4514969vem.15.1379077936385; Fri, 13 Sep 2013 06:12:16 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id gq10si3094813vdc.82.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:12:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 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.180; Received: by mail-vc0-f180.google.com with SMTP id gf11so912633vcb.11 for ; Fri, 13 Sep 2013 06:12:16 -0700 (PDT) X-Received: by 10.58.133.66 with SMTP id pa2mr11832471veb.18.1379077936305; Fri, 13 Sep 2013 06:12:16 -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 u4csp79909vcz; Fri, 13 Sep 2013 06:12:15 -0700 (PDT) X-Received: by 10.66.149.73 with SMTP id ty9mr15070158pab.36.1379077935314; Fri, 13 Sep 2013 06:12:15 -0700 (PDT) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id ua7si11236106pac.30.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:12:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.42; Received: by mail-pa0-f42.google.com with SMTP id lj1so2534668pab.1 for ; Fri, 13 Sep 2013 06:12:15 -0700 (PDT) X-Received: by 10.68.113.130 with SMTP id iy2mr8528959pbb.171.1379077934895; Fri, 13 Sep 2013 06:12:14 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id fa4sm18007393pab.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:12:14 -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 Subject: [PATCH 078/228] cpufreq: ppc-corenet: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:24 +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.220.180 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. Signed-off-by: Viresh Kumar --- drivers/cpufreq/ppc-corenet-cpufreq.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c index 5716b44..befd489 100644 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c @@ -252,14 +252,6 @@ static int __exit corenet_cpufreq_cpu_exit(struct cpufreq_policy *policy) return 0; } -static int corenet_cpufreq_verify(struct cpufreq_policy *policy) -{ - struct cpufreq_frequency_table *table = - per_cpu(cpu_data, policy->cpu)->table; - - return cpufreq_frequency_table_verify(policy, table); -} - static int corenet_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) { @@ -292,20 +284,15 @@ static int corenet_cpufreq_target(struct cpufreq_policy *policy, return ret; } -static struct freq_attr *corenet_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver ppc_corenet_cpufreq_driver = { .name = "ppc_cpufreq", .flags = CPUFREQ_CONST_LOOPS, .init = corenet_cpufreq_cpu_init, .exit = __exit_p(corenet_cpufreq_cpu_exit), - .verify = corenet_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = corenet_cpufreq_target, .get = corenet_cpufreq_get_speed, - .attr = corenet_cpufreq_attr, + .attr = cpufreq_generic_attr, }; static const struct of_device_id node_matches[] __initdata = {