From patchwork Fri Sep 13 13:00:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20127 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 BA40020358 for ; Fri, 13 Sep 2013 13:11:42 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id db12sf1228265veb.2 for ; Fri, 13 Sep 2013 06:11:42 -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=QuS54o86alEeQeB9tgKOhlg12tmcNf8nf974QDJCxZM=; b=C+lRUFw2vucQ/5ctJfeYw4Z93+fdEN/chbxwKSjSBfEExv0AvgVH7A9RUIGEHH5Mq8 EpfTl6DO7nSWgq8n+CbUufw4WpyIncSrkuJxoC+zcjOZRg8OeV7Av09cisRz5Lh3EDSL h93QxMLSzd7wVwgObOxXkycrZgHA16Dd2VT8G53/Hs+jP6YyS92mGuGuwakbMon6hwvK Vgz2N5yE831ArBeHWJ7QGIAqq/Iut7/jk/M8b7UTs0a58scaSwxthpBjIBf+ainVyZos 0ltOw+6tvZMAc7q0CJHr+GjdrMl8KHEovjUS4u3F+AfVv7PjByi/yW4WghHdYlrl7RXy apjQ== X-Gm-Message-State: ALoCoQmyBMMNYIJl+2DzvfJ6s/eiWQx+/pkFzQcZ5TVod3qzpXkFZUkW2Hem9kuv2fdVfeNwdjzs X-Received: by 10.236.69.35 with SMTP id m23mr5138417yhd.6.1379077902414; Fri, 13 Sep 2013 06:11:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.134.74 with SMTP id pi10ls1069179qeb.35.gmail; Fri, 13 Sep 2013 06:11:42 -0700 (PDT) X-Received: by 10.58.155.68 with SMTP id vu4mr7104710veb.21.1379077902142; Fri, 13 Sep 2013 06:11:42 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id sc5si3087410vdc.113.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 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.177; Received: by mail-ve0-f177.google.com with SMTP id db12so914395veb.36 for ; Fri, 13 Sep 2013 06:11:42 -0700 (PDT) X-Received: by 10.58.208.130 with SMTP id me2mr11891580vec.13.1379077902049; Fri, 13 Sep 2013 06:11:42 -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 u4csp79885vcz; Fri, 13 Sep 2013 06:11:41 -0700 (PDT) X-Received: by 10.66.234.193 with SMTP id ug1mr15455254pac.92.1379077901148; Fri, 13 Sep 2013 06:11:41 -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 is7si7450291pbc.29.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:41 -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 rr4so1208375pbb.20 for ; Fri, 13 Sep 2013 06:11:40 -0700 (PDT) X-Received: by 10.66.136.227 with SMTP id qd3mr14999851pab.113.1379077900707; Fri, 13 Sep 2013 06:11:40 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id xe9sm18055303pab.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:40 -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 , Santosh Shilimkar Subject: [PATCH 073/228] cpufreq: omap: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:19 +0530 Message-Id: <783c4e4fe9ce482205ad3ba1152f977c695ac01c.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.177 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)