From patchwork Sat Aug 10 06:44:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18959 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C828C246EB for ; Sat, 10 Aug 2013 06:51:02 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hf12sf1153772vcb.7 for ; Fri, 09 Aug 2013 23:51:02 -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=QuS54o86alEeQeB9tgKOhlg12tmcNf8nf974QDJCxZM=; b=pZUnq8LjoLnthqJldPrf0MQkOZigpP6uJSnJpgWLxJfUI48hza8hND6RDmd0yVEagk c91DwnrzLyegKipYbusC5/ZNNG7ww+yVKz0VvwEaEJQcD91y2+RaL5gkP9y+nNNdrzQY 419HGxvDw0bA2IPnD+suN5l7Rr4G83uUh8IAxokbA6Zz5AVCJan4aCHB0AIyLxO1EejS rPn4oqZMRT9JoR1V/KZpr8M9t+n4mpWXvLxuF3HtfazmhWAZcGlPrfTpXcBqfF9WSqIe ddQK8PkY10/eNqMn5wcqCs04hYdGwV2FcWbSMVluOibxOdRTZVjd9Cw0dgq02Czz8qTA FXtg== X-Received: by 10.236.38.106 with SMTP id z70mr6632074yha.29.1376117462518; Fri, 09 Aug 2013 23:51:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.10 with SMTP id em10ls1703947qeb.82.gmail; Fri, 09 Aug 2013 23:51:02 -0700 (PDT) X-Received: by 10.220.164.202 with SMTP id f10mr8473754vcy.25.1376117462399; Fri, 09 Aug 2013 23:51:02 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id na3si5675731vcb.132.2013.08.09.23.51.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 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.172; Received: by mail-vc0-f172.google.com with SMTP id m17so1635218vca.3 for ; Fri, 09 Aug 2013 23:51:02 -0700 (PDT) X-Gm-Message-State: ALoCoQmd+6j9YqGHEj8MHlg1qMFZetgUSw6LBuuctiSAVBxt+B+uJMvB0ZIMR2e3+oB5w11EUppC X-Received: by 10.58.6.210 with SMTP id d18mr2144604vea.96.1376117462325; Fri, 09 Aug 2013 23:51:02 -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 u4csp187vcz; Fri, 9 Aug 2013 23:51:01 -0700 (PDT) X-Received: by 10.66.122.41 with SMTP id lp9mr15195167pab.6.1376117461243; Fri, 09 Aug 2013 23:51:01 -0700 (PDT) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by mx.google.com with ESMTPS id yk3si15796370pac.41.2013.08.09.23.51.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.41 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.41; Received: by mail-pb0-f41.google.com with SMTP id rp2so5241959pbb.0 for ; Fri, 09 Aug 2013 23:51:00 -0700 (PDT) X-Received: by 10.66.142.42 with SMTP id rt10mr4153190pab.1.1376117460878; Fri, 09 Aug 2013 23:51:00 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id eq5sm24174174pbc.15.2013.08.09.23.50.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:50:59 -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 , Santosh Shilimkar Subject: [PATCH 26/44] cpufreq: omap: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:22 +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.172 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: Santosh Shilimkar Signed-off-by: Viresh Kumar --- drivers/cpufreq/omap-cpufreq.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 091f233..48020b5 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -40,13 +40,6 @@ static struct clk *mpu_clk; static struct device *mpu_dev; static struct regulator *mpu_reg; -static int omap_verify_speed(struct cpufreq_policy *policy) -{ - if (!freq_table) - return -EINVAL; - return cpufreq_frequency_table_verify(policy, freq_table); -} - static unsigned int omap_getspeed(unsigned int cpu) { unsigned long rate; @@ -227,20 +220,15 @@ static int omap_cpu_exit(struct cpufreq_policy *policy) return 0; } -static struct freq_attr *omap_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver omap_driver = { .flags = CPUFREQ_STICKY, - .verify = omap_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = omap_target, .get = omap_getspeed, .init = omap_cpu_init, .exit = omap_cpu_exit, .name = "omap", - .attr = omap_cpufreq_attr, + .attr = cpufreq_generic_attr, }; static int omap_cpufreq_probe(struct platform_device *pdev)