From patchwork Sat Aug 10 06:44:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18948 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f198.google.com (mail-ye0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2E793246EB for ; Sat, 10 Aug 2013 06:49:45 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m12sf1499996yen.1 for ; Fri, 09 Aug 2013 23:49:44 -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=W5xceCWyExnOgfvIa3GnUtdqBt683F30on1tce8/Jwk=; b=IHGkCyqBfEbzNRc5i8TfW5PjlHRlhOG+rqeRrRIB7GimqRBwATb7mTZJ6+I/+KHS0M SeBgIrYnEm12WV7iHhTYZ0ntcCmAyLM6zOeAKdppljVZxDkEEF9SQa7NJWIuyIzwkdGM kYUTgiqCvVNqPSbZDjNSXe/RaXUIH2aEvK3rzECieEu7AN6U9PryHKSy374sUf+Jn+rk KYtI4ankO5gs3AAGmA/3MVg4Pk1t245/c+Rcq8nqUXo4wZlBs9854FJl/D5PSVofB9Bz ee2qBqVA5vQjVr76sBrcQ10erxB+XZiAKxt5m97zQ1uzyB1Zq6TtRCcaNrlatlvgCWeL 5D9A== X-Received: by 10.236.91.4 with SMTP id g4mr6828973yhf.30.1376117384886; Fri, 09 Aug 2013 23:49:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.2 with SMTP id s2ls1702725qed.18.gmail; Fri, 09 Aug 2013 23:49:44 -0700 (PDT) X-Received: by 10.58.75.41 with SMTP id z9mr2277862vev.4.1376117384758; Fri, 09 Aug 2013 23:49:44 -0700 (PDT) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id xu8si5686498vcb.5.2013.08.09.23.49.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.54 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.54; Received: by mail-vb0-f54.google.com with SMTP id q14so3731735vbe.13 for ; Fri, 09 Aug 2013 23:49:44 -0700 (PDT) X-Gm-Message-State: ALoCoQmzHjq3MRL3ebTtBxYju0RWdGEkhVBujlRe6a5k2VroFajp788d9vHlV+sddt4jGpZm0+Ux X-Received: by 10.58.211.227 with SMTP id nf3mr2217547vec.20.1376117384688; Fri, 09 Aug 2013 23:49:44 -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 u4csp136vcz; Fri, 9 Aug 2013 23:49:44 -0700 (PDT) X-Received: by 10.68.48.166 with SMTP id m6mr14744283pbn.105.1376117383471; Fri, 09 Aug 2013 23:49:43 -0700 (PDT) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by mx.google.com with ESMTPS id c10si15794838pav.26.2013.08.09.23.49.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.45 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.45; Received: by mail-pa0-f45.google.com with SMTP id bg4so5707646pad.32 for ; Fri, 09 Aug 2013 23:49:43 -0700 (PDT) X-Received: by 10.66.121.234 with SMTP id ln10mr14732491pab.20.1376117383086; Fri, 09 Aug 2013 23:49:43 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ai6sm26644291pad.15.2013.08.09.23.49.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:42 -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 , Sekhar Nori Subject: [PATCH 15/44] cpufreq: davinci: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:11 +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.212.54 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: Sekhar Nori Signed-off-by: Viresh Kumar --- drivers/cpufreq/davinci-cpufreq.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c index f67196e..33e9460 100644 --- a/drivers/cpufreq/davinci-cpufreq.c +++ b/drivers/cpufreq/davinci-cpufreq.c @@ -157,26 +157,15 @@ static int davinci_cpu_init(struct cpufreq_policy *policy) return 0; } -static int davinci_cpu_exit(struct cpufreq_policy *policy) -{ - cpufreq_frequency_table_put_attr(policy->cpu); - return 0; -} - -static struct freq_attr *davinci_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver davinci_driver = { .flags = CPUFREQ_STICKY, .verify = davinci_verify_speed, .target = davinci_target, .get = davinci_getspeed, .init = davinci_cpu_init, - .exit = davinci_cpu_exit, + .exit = cpufreq_generic_exit, .name = "davinci", - .attr = davinci_cpufreq_attr, + .attr = cpufreq_generic_attr, }; static int __init davinci_cpufreq_probe(struct platform_device *pdev)