From patchwork Fri Sep 13 13:00:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20116 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3BE7C20358 for ; Fri, 13 Sep 2013 13:10:25 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id r5sf1197033qcx.4 for ; Fri, 13 Sep 2013 06:10:25 -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=iDyz+Z3JBw8rTaylCbCvdvnr70k7XvNOu/mR95uSNqs=; b=IqiaB+5pIEDpVw1/GV63abnVqA+F4ljgLI2RWaBDlk1+Hnup2ZDyjj1MNQUaUfCHLD J9TPxSlwM2iQ32ZAePqlg2cA35wksbqaw74sulr0xjLVJ8qCcsjO39MAB1jjpcsOC6kO 6VImx5LnUf+b0aX+6CwGZyCpLTrM6GLcAlvclOy7wk1Iz0sTyrIIZcGsL1nDZXjonBea PlOQiBPn3AB7BZnQpY10qCIlkPGYqF6INeZw7bxCGvCxbJhJeUKdNlbmZIMaDWDw0PGq yMkMpwIjSEE4Tq7yqR1KurJhcMNPlach/3C2lnWddhcM6rjXi0j3+8loASbJ1E1ZR/Gk c+Ow== X-Gm-Message-State: ALoCoQnu3bRmU5T0Dt+2KgUfaw48imyZOfpvx5PRNsxsHoHeuRCuEVWcfD94XH5QPcJvAVxb1KJI X-Received: by 10.236.167.138 with SMTP id i10mr5417179yhl.9.1379077825056; Fri, 13 Sep 2013 06:10:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.39.193 with SMTP id r1ls1218260qek.30.gmail; Fri, 13 Sep 2013 06:10:24 -0700 (PDT) X-Received: by 10.59.8.232 with SMTP id dn8mr11892646ved.8.1379077824803; Fri, 13 Sep 2013 06:10:24 -0700 (PDT) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id wp10si3090456vdb.97.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.51 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.51; Received: by mail-vb0-f51.google.com with SMTP id x16so872555vbf.38 for ; Fri, 13 Sep 2013 06:10:24 -0700 (PDT) X-Received: by 10.220.10.194 with SMTP id q2mr11809060vcq.2.1379077824709; Fri, 13 Sep 2013 06:10:24 -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 u4csp79816vcz; Fri, 13 Sep 2013 06:10:24 -0700 (PDT) X-Received: by 10.68.211.10 with SMTP id my10mr8572500pbc.170.1379077823866; Fri, 13 Sep 2013 06:10:23 -0700 (PDT) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx.google.com with ESMTPS id br4si7390844pbd.303.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.46; Received: by mail-pa0-f46.google.com with SMTP id fa1so2519211pad.33 for ; Fri, 13 Sep 2013 06:10:23 -0700 (PDT) X-Received: by 10.68.232.134 with SMTP id to6mr8741337pbc.163.1379077823434; Fri, 13 Sep 2013 06:10:23 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id om2sm11668769pbc.30.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:22 -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 , Sekhar Nori Subject: [PATCH 062/228] cpufreq: davinci: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:08 +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.51 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 ba03e6f..f228642 100644 --- a/drivers/cpufreq/davinci-cpufreq.c +++ b/drivers/cpufreq/davinci-cpufreq.c @@ -155,26 +155,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)