From patchwork Fri Sep 13 13:02:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20243 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 66D9620358 for ; Fri, 13 Sep 2013 13:25:32 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id gf11sf1212333vcb.6 for ; Fri, 13 Sep 2013 06:25:32 -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=ZnpxcvFfMoVLTbwzpI5oUGxudHk81WUxJhzT+bSUiVo=; b=lMh1pLYHmleqd/Mg+i+VezhTomPeJq46dDN1xpMaMJ4iDZpFVNDwsnHseJK+qxGJHL S7xnwjk/B11nznGpd+LdvOkNEi0sW7DdY4A4/nf17xW+CXM9S8Ykmp5gElntb2eZ2kyY jU8tkzi5adsQwZpSr7tZHJcFPQ6W7OqlIGpVnGswk3b1MKyrMZjan4q1bms0WhXdDOv6 DRbRQB/oKpWRf6oSUVXfbHOOVvPXvEHQBqiQkomtHIbAl491tIvQAZY4ILXnHeKGHujg FIwDbPEAkONDjN2BhZOs762CoO9nEgYQWpWi+dSBJZ7wMIn754NzFCmuynvFj372qZ8c 3tvA== X-Gm-Message-State: ALoCoQlPi2KTUtOMVYJGBF+EGDJdtHBgOtaxzFhssMPqk+HEpjNPUr6x2fkiYrJteDFjbxVdOIou X-Received: by 10.236.41.100 with SMTP id g64mr5122253yhb.31.1379078732167; Fri, 13 Sep 2013 06:25:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.20 with SMTP id u20ls1210844qeb.92.gmail; Fri, 13 Sep 2013 06:25:32 -0700 (PDT) X-Received: by 10.58.118.130 with SMTP id km2mr11939280veb.0.1379078731966; Fri, 13 Sep 2013 06:25:31 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id y4si3134664vcx.24.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:25:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 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.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so935482veb.2 for ; Fri, 13 Sep 2013 06:25:31 -0700 (PDT) X-Received: by 10.58.100.234 with SMTP id fb10mr12153223veb.5.1379078731892; Fri, 13 Sep 2013 06:25:31 -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 u4csp80618vcz; Fri, 13 Sep 2013 06:25:31 -0700 (PDT) X-Received: by 10.68.244.2 with SMTP id xc2mr13491247pbc.58.1379078730918; Fri, 13 Sep 2013 06:25:30 -0700 (PDT) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx.google.com with ESMTPS id 7si7460981pbv.197.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:25:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.181 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.181; Received: by mail-pd0-f181.google.com with SMTP id g10so1251580pdj.12 for ; Fri, 13 Sep 2013 06:25:30 -0700 (PDT) X-Received: by 10.68.33.100 with SMTP id q4mr6057466pbi.119.1379078730518; Fri, 13 Sep 2013 06:25:30 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id py4sm11748569pbb.33.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:25:30 -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 , Linus Walleij Subject: [PATCH 189/228] cpufreq: dbx500: remove calls to cpufreq_notify_transition() Date: Fri, 13 Sep 2013 18:32:15 +0530 Message-Id: <6fbcd6c0c6799d62f379b7c02ef08a93714b75a9.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.171 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 drivers do following in their ->target_index() routines: struct cpufreq_freqs freqs; freqs.old = old freq... freqs.new = new freq... cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); /* Change rate here */ cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); This is replicated over all cpufreq drivers today and there doesn't exists a good enough reason why this shouldn't be moved to cpufreq core instead. Earlier patches have added support in cpufreq core to do cpufreq notification on frequency change, this one removes it from this driver. Some related minor cleanups are also done along with it. Cc: Linus Walleij Signed-off-by: Viresh Kumar Acked-by: Linus Walleij --- drivers/cpufreq/dbx500-cpufreq.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index 238b169..0e67ab9 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -22,28 +22,8 @@ static struct clk *armss_clk; static int dbx500_cpufreq_target(struct cpufreq_policy *policy, unsigned int index) { - struct cpufreq_freqs freqs; - int ret; - - freqs.old = policy->cur; - freqs.new = freq_table[index].frequency; - - /* pre-change notification */ - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - /* update armss clk frequency */ - ret = clk_set_rate(armss_clk, freqs.new * 1000); - - if (ret) { - pr_err("dbx500-cpufreq: Failed to set armss_clk to %d Hz: error %d\n", - freqs.new * 1000, ret); - freqs.new = freqs.old; - } - - /* post change notification */ - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - - return ret; + return clk_set_rate(armss_clk, freq_table[index].frequency * 1000); } static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu)