From patchwork Fri Sep 13 13:00:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20143 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 E11C120358 for ; Fri, 13 Sep 2013 13:13:35 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id db12sf1225128veb.10 for ; Fri, 13 Sep 2013 06:13:35 -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=8JFWfg+SKbUDzA+6QW8IQyjl9kRhCozXHz90ovUyl4E=; b=ecZH79wb5ZYMWbn44IF1OB2Qgp7SBwi4XkXjoFm4Bp5UAEj6ATSxNtEqSWbx+X44x7 mVog6Ef5VbXWicNgE8p1niy9L+rt1JUV2d/Q+ALYgeS5wcCAqi02Bi+Po+guo9FZAG+s HJh0GpeQsfeE6k4FBR9ooUCA/rmGO28MXeX+yb/S978aTvj86cT++VmDE8UP4NqudPiF mG2MNWf5+LWShMtnq2ObX2WSePBggdrC5uF0vVkk/3QW2eJpH3jZD3XB4HPQLid6oZpH t0VNwqoHgeM9DHyglE4F7Df2J0pxIPqEMdi2SqzgyczUFPBxc/xMJNX2N+k+MZWDxxxK 9YFg== X-Gm-Message-State: ALoCoQlvu8OXxOB+k6NhL61rjqHZGJjicNvfHftV0yeJg+kPiI0gELzzOx0dz/a/FdkQr8WJ3vjY X-Received: by 10.236.41.100 with SMTP id g64mr5106410yhb.31.1379078015490; Fri, 13 Sep 2013 06:13:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.16.200 with SMTP id i8ls1155127qed.65.gmail; Fri, 13 Sep 2013 06:13:35 -0700 (PDT) X-Received: by 10.58.19.233 with SMTP id i9mr28257vee.36.1379078015285; Fri, 13 Sep 2013 06:13:35 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id fe2si3120691vcb.16.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:13:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 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.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so933098veb.16 for ; Fri, 13 Sep 2013 06:13:35 -0700 (PDT) X-Received: by 10.220.74.69 with SMTP id t5mr12027336vcj.18.1379078015199; Fri, 13 Sep 2013 06:13:35 -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 u4csp79961vcz; Fri, 13 Sep 2013 06:13:34 -0700 (PDT) X-Received: by 10.68.234.41 with SMTP id ub9mr1571218pbc.201.1379078014366; Fri, 13 Sep 2013 06:13:34 -0700 (PDT) Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by mx.google.com with ESMTPS id to1si11134334pab.312.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:13:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.47 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.47; Received: by mail-pb0-f47.google.com with SMTP id rr4so1217367pbb.34 for ; Fri, 13 Sep 2013 06:13:34 -0700 (PDT) X-Received: by 10.68.254.105 with SMTP id ah9mr13463784pbd.87.1379078013934; Fri, 13 Sep 2013 06:13:33 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id 7sm18002088paf.22.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:13:33 -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 , Stephen Warren Subject: [PATCH 089/228] cpufreq: tegra: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:35 +0530 Message-Id: <61fa7239e5848bfe69dbc86c09cc0e9bea9451b4.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.171 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: Stephen Warren Signed-off-by: Viresh Kumar --- drivers/cpufreq/tegra-cpufreq.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c index e014077..c36a8e7 100644 --- a/drivers/cpufreq/tegra-cpufreq.c +++ b/drivers/cpufreq/tegra-cpufreq.c @@ -51,11 +51,6 @@ static unsigned long target_cpu_speed[NUM_CPUS]; static DEFINE_MUTEX(tegra_cpu_lock); static bool is_suspended; -static int tegra_verify_speed(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, freq_table); -} - static unsigned int tegra_getspeed(unsigned int cpu) { unsigned long rate; @@ -237,19 +232,14 @@ static int tegra_cpu_exit(struct cpufreq_policy *policy) return 0; } -static struct freq_attr *tegra_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver tegra_cpufreq_driver = { - .verify = tegra_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = tegra_target, .get = tegra_getspeed, .init = tegra_cpu_init, .exit = tegra_cpu_exit, .name = "tegra", - .attr = tegra_cpufreq_attr, + .attr = cpufreq_generic_attr, }; static int __init tegra_cpufreq_init(void)