From patchwork Fri Aug 16 02:25: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: 19184 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 098602486D for ; Fri, 16 Aug 2013 02:27:14 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f64sf232592yha.6 for ; Thu, 15 Aug 2013 19:27:13 -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=xNHRVxCcb/8z8mC2ylj+lx98WDF3lPZ4xi3J6L2+sek=; b=mDO0C7a3vd2bWfn/wEzzRoyruv2DHLDazzMaimDO7HllV1GdVbvPnIs8cXGTzH8hPU tmB/nIGzUtfcjpKcF7/xbQLC+k8JK+KbOZRcGrKI4uka1Z4WMLDZpPoWX906FlP6nfGS WimTategQhdj+vVEUcY4+7yLawPZ0K6v9NylNQuPMIgi+nKhAPF1CAarKDk+dr74vg0E EXLB4EdBZb4sMacJGvIduTZ7aBpVSNQ+IdCkaFm7/U5ENZmT53F2dpukJcoh5gjEJMm9 e/2+liiEIsjpczwq/SJCJJWNHwAvgWvV1NemrSSFpyYgIfIWSS4GMYMmVBJa/T3RHYMR Q6fw== X-Received: by 10.224.173.4 with SMTP id n4mr710321qaz.3.1376620033688; Thu, 15 Aug 2013 19:27:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.26.70 with SMTP id j6ls641271qeg.94.gmail; Thu, 15 Aug 2013 19:27:13 -0700 (PDT) X-Received: by 10.221.56.194 with SMTP id wd2mr17540759vcb.7.1376620033541; Thu, 15 Aug 2013 19:27:13 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id aa5si694710vdc.78.2013.08.15.19.27.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 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.174; Received: by mail-ve0-f174.google.com with SMTP id d10so1113712vea.33 for ; Thu, 15 Aug 2013 19:27:13 -0700 (PDT) X-Gm-Message-State: ALoCoQldXCoQhBk+Yav1BuQMYS4Fv0+3RPG2hFhXI87ftakv6oguzaA/+1cNgC7CTqrOzGiBDeEf X-Received: by 10.58.165.70 with SMTP id yw6mr17370904veb.19.1376620033454; Thu, 15 Aug 2013 19:27:13 -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 u4csp45173vcz; Thu, 15 Aug 2013 19:27:12 -0700 (PDT) X-Received: by 10.68.209.196 with SMTP id mo4mr18697396pbc.114.1376620032475; Thu, 15 Aug 2013 19:27:12 -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 bk3si1643747pbd.268.2013.08.15.19.27.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:12 -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 g10so1601614pdj.12 for ; Thu, 15 Aug 2013 19:27:12 -0700 (PDT) X-Received: by 10.68.160.5 with SMTP id xg5mr283959pbb.173.1376620032129; Thu, 15 Aug 2013 19:27:12 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id vz4sm107763pab.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:11 -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 Subject: [PATCH 11/34] cpufreq: elanfreq: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55: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.128.174 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. Signed-off-by: Viresh Kumar --- drivers/cpufreq/elanfreq.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index 4ab4153..de08acf 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c @@ -108,17 +108,6 @@ static unsigned int elanfreq_get_cpu_frequency(unsigned int cpu) static int elanfreq_target(struct cpufreq_policy *policy, unsigned int state) { - struct cpufreq_freqs freqs; - - freqs.old = elanfreq_get_cpu_frequency(0); - freqs.new = elan_multiplier[state].clock; - - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - - printk(KERN_INFO "elanfreq: attempting to set frequency to %i kHz\n", - elan_multiplier[state].clock); - - /* * Access to the Elan's internal registers is indexed via * 0x22: Chip Setup & Control Register Index Register (CSCI) @@ -149,8 +138,6 @@ static int elanfreq_target(struct cpufreq_policy *policy, udelay(10000); local_irq_enable(); - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - return 0; } /*