From patchwork Sat Aug 10 06:44:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18975 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f199.google.com (mail-gh0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 90DFE246EB for ; Sat, 10 Aug 2013 06:52:55 +0000 (UTC) Received: by mail-gh0-f199.google.com with SMTP id g14sf2334198ghb.6 for ; Fri, 09 Aug 2013 23:52:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state: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=uvUuHuWHYF6G9nlrEXIvOXoRi0LDT+1oQaeXW2OMAIM=; b=ho17TnRPsTrj/zXD3v0xFnA8gOPO3A7Qm6fRRHGamguhs4Jjb2e6bccmCvpXt0VxVS pT0ra+A6uCncrSzNe0HC7udK5eefWCNfpiiE8/yNyZchDQ9vVS8xYSzpjZF95o1OvNDW o87Zyi7XKMnszoMldLQRwb8MWlFWVA6xnMMB7rTCC/c6Rskj3v+PfU27cXOd0OOM8Bmh jGh2fxb1/RTW3iJHpowwgKAGSF5yFBgMECib2Nok1J9ulafULkvWROjcBP9MLwD0DEx4 XDyM9UgJziLWuZg/V01JgG0TesS4L1UXQBQura9M+AP8mhswZ7tzTy1z+PWc4rgi6uPV w4dg== X-Received: by 10.236.20.83 with SMTP id o59mr6980677yho.28.1376117575292; Fri, 09 Aug 2013 23:52:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.8 with SMTP id g8ls1814899qeg.67.gmail; Fri, 09 Aug 2013 23:52:55 -0700 (PDT) X-Received: by 10.220.163.72 with SMTP id z8mr2203006vcx.89.1376117575185; Fri, 09 Aug 2013 23:52:55 -0700 (PDT) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id xs10si5678555vcb.118.2013.08.09.23.52.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:52:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.45 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.45; Received: by mail-vb0-f45.google.com with SMTP id e15so4590535vbg.18 for ; Fri, 09 Aug 2013 23:52:55 -0700 (PDT) X-Gm-Message-State: ALoCoQlbjBJDSuFcIWhgGYdzJtQLcGTN3+B0D5NhUBfRof7om5z5B8kL7Heau64SNRXui00RaktO X-Received: by 10.221.47.193 with SMTP id ut1mr2238547vcb.8.1376117575119; Fri, 09 Aug 2013 23:52:55 -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 u4csp268vcz; Fri, 9 Aug 2013 23:52:54 -0700 (PDT) X-Received: by 10.68.29.2 with SMTP id f2mr14890201pbh.184.1376117574270; Fri, 09 Aug 2013 23:52:54 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id os4si15776850pac.178.2013.08.09.23.52.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:52:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.50; Received: by mail-pa0-f50.google.com with SMTP id fb10so5654650pad.23 for ; Fri, 09 Aug 2013 23:52:53 -0700 (PDT) X-Received: by 10.66.146.66 with SMTP id ta2mr15188847pab.11.1376117573902; Fri, 09 Aug 2013 23:52:53 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id a5sm24198707pbw.4.2013.08.09.23.52.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:52:53 -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, Viresh Kumar , Stephen Warren Subject: [PATCH 42/44] cpufreq: tegra: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:38 +0530 Message-Id: <0fd7c21856de4c70e2610a89ba6345332eda7aba.1376116345.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.212.45 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 faf1ce5..affb294 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)