From patchwork Fri Sep 13 13:00:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2889851 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 AE53A9F1BF for ; Fri, 13 Sep 2013 15:01:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C1E520220 for ; Fri, 13 Sep 2013 15:00:56 +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 AC4112021A for ; Fri, 13 Sep 2013 15:00:54 +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 1VKTFf-0003fv-Lz; Fri, 13 Sep 2013 13:17:36 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTF4-0007Ev-87; Fri, 13 Sep 2013 13:16:58 +0000 Received: from mail-pa0-f47.google.com ([209.85.220.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKT9F-0006N2-PM for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2013 13:10:58 +0000 Received: by mail-pa0-f47.google.com with SMTP id kl13so2499678pab.6 for ; Fri, 13 Sep 2013 06:10:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=U4B7ROFbnIisArqnlDjEd1Rv45WcM8RRimWlhsDbYQs=; b=PYkJLUJoUyPi6B8NxE1wwoeegmJtIshU0b1zqqQ8WcFloy+bH0UHIbQ3bxDb1ptCGG Staz/Wt+vbeXQcyOICQE4aNxcMp3Z6Yjpl4Uqo/ENI7zM7XsfBWYr/XRfZjWOYwJdFff BBogtOFm1XRGysfcXqofcOzblOJqJaCXRSx4BTHXzlnQLNb6Pcb7DYJzGq5iawAhEEZc k+urbOh6L4f10wyJ5eByOwBOWPldvzRpqtMY9ymMc61Rm65XoD6HwLeDH2C1aoSzXyda BGcsxCet2hJ57+QHcqK6uX2WNYvVVQdGj+iqBvEeF1QBM/VWytU7gVY25ixpKhNY6Ve8 RpjQ== X-Gm-Message-State: ALoCoQnS4gujOc++KYMHIxGdGHJ8F3JYm91v1juRRpEFA5+LozoNg3ixE5Khal+tMy6+fA90oqfU X-Received: by 10.67.23.71 with SMTP id hy7mr15026263pad.99.1379077836889; Fri, 13 Sep 2013 06:10:36 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ys4sm11694991pbb.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:36 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 064/228] cpufreq: e_powersaver: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:10 +0530 Message-Id: <398abf18b914085df814f99fc6d2dabbce0bf890.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130913_091057_942883_16BA94AD X-CRM114-Status: GOOD ( 13.09 ) 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, 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=-5.1 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 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/e_powersaver.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index c1b7c99..a8cbbd0 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c @@ -198,12 +198,6 @@ static int eps_target(struct cpufreq_policy *policy, return ret; } -static int eps_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, - &eps_cpu[policy->cpu]->freq_table[0]); -} - static int eps_cpu_init(struct cpufreq_policy *policy) { unsigned int i; @@ -423,19 +417,14 @@ static int eps_cpu_exit(struct cpufreq_policy *policy) return 0; } -static struct freq_attr *eps_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver eps_driver = { - .verify = eps_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = eps_target, .init = eps_cpu_init, .exit = eps_cpu_exit, .get = eps_get, .name = "e_powersaver", - .attr = eps_attr, + .attr = cpufreq_generic_attr, };