From patchwork Fri Sep 13 13:00:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20117 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 530FA20358 for ; Fri, 13 Sep 2013 13:10:32 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf1195900vbg.4 for ; Fri, 13 Sep 2013 06:10:32 -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=RltgFqTS7hY0A8FEypFPmo62+tgpvk8qR/06h2l5WAs=; b=RnUV4gYf62J1bxmCkMxTdNPulv6FNqSDmXAgxoxoAu3/TIBGovm6IBtvpjFookxver 8pupfVxF9+SH+7qz5ZZqHcNZyHTb2rvDVvjKg1V4x0UDsjv44BOo70jITaEhAMXmhsNb N5hatnKtzs3rVnkbZPIrRY8XZkNJOn0q3bgA0r/t68mUh2FLX00+u/OmMuvSZIL+Yj9o /TgREEi9fFi5iwCVavvRE1Lxdb5K/dnk4cWzhPqtPIBN0WLPjFBONgS6mOCqNEp3m+ZC XWV85Pm8GdoGk+z79yzg1tYpRHv9h6XfQbh0ZpBq/aFsepmpZw7odVufWCrl91FjwC/b /5Xw== X-Gm-Message-State: ALoCoQk2kKE/RaqLGJF/6roZ0EyIJtXy/HUYMkcNJa2XYa2/StznneNqg28NaFqFQBz+YkEiNXM1 X-Received: by 10.236.52.228 with SMTP id e64mr4817495yhc.45.1379077832072; Fri, 13 Sep 2013 06:10:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.39.163 with SMTP id q3ls1111893qek.31.gmail; Fri, 13 Sep 2013 06:10:31 -0700 (PDT) X-Received: by 10.220.249.67 with SMTP id mj3mr6904597vcb.23.1379077831838; Fri, 13 Sep 2013 06:10:31 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id bz3si3108982vcb.48.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 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.176; Received: by mail-vc0-f176.google.com with SMTP id lf11so898411vcb.35 for ; Fri, 13 Sep 2013 06:10:31 -0700 (PDT) X-Received: by 10.220.74.69 with SMTP id t5mr12015434vcj.18.1379077831766; Fri, 13 Sep 2013 06:10:31 -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 u4csp79822vcz; Fri, 13 Sep 2013 06:10:31 -0700 (PDT) X-Received: by 10.68.98.36 with SMTP id ef4mr13445842pbb.27.1379077830892; Fri, 13 Sep 2013 06:10:30 -0700 (PDT) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id is7si7399324pbc.269.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.41; Received: by mail-pa0-f41.google.com with SMTP id bj1so2516926pad.14 for ; Fri, 13 Sep 2013 06:10:30 -0700 (PDT) X-Received: by 10.66.25.232 with SMTP id f8mr15276790pag.25.1379077830339; Fri, 13 Sep 2013 06:10:30 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id os4sm11670450pbb.25.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:29 -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 , Linus Walleij Subject: [PATCH 063/228] cpufreq: dbx500: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:09 +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.176 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: Linus Walleij Signed-off-by: Viresh Kumar --- drivers/cpufreq/dbx500-cpufreq.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index 8a484e9..2d70637 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -19,16 +19,6 @@ static struct cpufreq_frequency_table *freq_table; static struct clk *armss_clk; -static struct freq_attr *dbx500_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - -static int dbx500_cpufreq_verify_speed(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, freq_table); -} - static int dbx500_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) @@ -113,12 +103,12 @@ static int dbx500_cpufreq_init(struct cpufreq_policy *policy) static struct cpufreq_driver dbx500_cpufreq_driver = { .flags = CPUFREQ_STICKY | CPUFREQ_CONST_LOOPS, - .verify = dbx500_cpufreq_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = dbx500_cpufreq_target, .get = dbx500_cpufreq_getspeed, .init = dbx500_cpufreq_init, .name = "DBX500", - .attr = dbx500_cpufreq_attr, + .attr = cpufreq_generic_attr, }; static int dbx500_cpufreq_probe(struct platform_device *pdev)