From patchwork Fri Sep 13 13:00:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20133 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 380C120358 for ; Fri, 13 Sep 2013 13:12:24 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id l13sf1194589qcy.5 for ; Fri, 13 Sep 2013 06:12:24 -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=1MRruBxreNtCuwxtYk7ZPY3xW2Hy+NK0ZlmwrQyJhiI=; b=UdwW2tVhJBjeeQuYrC9xMmEZLybWehIhiy56bMnJkR9xNqBpishfFe3m4snbUvZa3d Li7aHi+bdTomvVnosfq0pso8BQihPOZPbDPnsit88ELGODD0YPcJKSlRzRGAPxO+tHPN qf5rpiEfbTCkdLGwTxqeZmTn1cW+HtqEmO8XpmDe9PZz1ggZkt46efvdJEtCsl+DFYKB GxNWtNkstt02OnXDlobPznpAr43H0VOje2h3mS9/zdWaKzPx3nSg5ZKDypILpOdRvdJq rTbsqAJWTTkgZ+yBiokFMzVFykTPQeT2vj1Q/RJGAskqGnvCq58LbWJM4Fob9tXB3em/ fAvw== X-Gm-Message-State: ALoCoQn0MqUOy+7uvkbX/e0YUM37zrnB1qJlEqwmvB/5iIekHpRFa+xEBFHbHaLkPlkCBlSw8yty X-Received: by 10.236.207.103 with SMTP id m67mr5010446yho.1.1379077944057; Fri, 13 Sep 2013 06:12:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.14.106 with SMTP id o10ls1131383qec.36.gmail; Fri, 13 Sep 2013 06:12:23 -0700 (PDT) X-Received: by 10.52.27.243 with SMTP id w19mr6455358vdg.3.1379077943828; Fri, 13 Sep 2013 06:12:23 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id fw17si3088530vec.142.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:12:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id c14so912655vea.38 for ; Fri, 13 Sep 2013 06:12:23 -0700 (PDT) X-Received: by 10.58.208.130 with SMTP id me2mr11894164vec.13.1379077943744; Fri, 13 Sep 2013 06:12:23 -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 u4csp79916vcz; Fri, 13 Sep 2013 06:12:23 -0700 (PDT) X-Received: by 10.68.200.9 with SMTP id jo9mr13197393pbc.120.1379077942857; Fri, 13 Sep 2013 06:12:22 -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 fa1si11236948pab.13.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:12:22 -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 xb4so1209591pbc.36 for ; Fri, 13 Sep 2013 06:12:22 -0700 (PDT) X-Received: by 10.67.24.7 with SMTP id ie7mr15087465pad.112.1379077942465; Fri, 13 Sep 2013 06:12:22 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id a5sm11709853pbw.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:12:21 -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 079/228] cpufreq: ppc_cbe: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:25 +0530 Message-Id: <889403c08078118ca2763484571de34a7cb114fc.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.128.179 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_cbe_cpufreq.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c b/drivers/cpufreq/ppc_cbe_cpufreq.c index 6c5be63..38540d1 100644 --- a/drivers/cpufreq/ppc_cbe_cpufreq.c +++ b/drivers/cpufreq/ppc_cbe_cpufreq.c @@ -128,17 +128,6 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) return cpufreq_table_validate_and_show(policy, cbe_freqs); } -static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy) -{ - cpufreq_frequency_table_put_attr(policy->cpu); - return 0; -} - -static int cbe_cpufreq_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, cbe_freqs); -} - static int cbe_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) @@ -174,10 +163,10 @@ static int cbe_cpufreq_target(struct cpufreq_policy *policy, } static struct cpufreq_driver cbe_cpufreq_driver = { - .verify = cbe_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = cbe_cpufreq_target, .init = cbe_cpufreq_cpu_init, - .exit = cbe_cpufreq_cpu_exit, + .exit = cpufreq_generic_exit, .name = "cbe-cpufreq", .flags = CPUFREQ_CONST_LOOPS, };