From patchwork Fri Aug 16 02:25:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19194 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 919632486D for ; Fri, 16 Aug 2013 02:28:29 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf234240yhz.3 for ; Thu, 15 Aug 2013 19:28:29 -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=S5tHJ4YeJStpwBttNsUKvMsK0waqx2vQOShDiFotvGE=; b=LNIIj7y+zBv4/qMgX3jUsLuWOGNFQe6awahqXADmbxDrOgKfL7TnLmteOY37j4xpno nIfD4+E2PRdAleMZNkuguqmvQN1p0WDIK5c1wGEBuzJBWlYql5S2vM23WdTaJSCBh2eY Z+oUfyN9Uj8TFpdFr52uB9/TulIbSSYwQo25ySKKbGOUMcCeq+NBS2UufB5L9JcGzXnc z3EOty6Fc/kQg2lQt6ZfoBi4JDpEVkEp9Wf2lwjhu076n2DMDRMlVl+3qPYc3GnlE4dn 0kjqNkTaJlq6CCqY5LGaX6x06brWGHV2Q9XbAI90O2o0daSaWT92ETP4zKBM1+4bX+w0 NERA== X-Received: by 10.58.32.167 with SMTP id k7mr1345vei.41.1376620109283; Thu, 15 Aug 2013 19:28:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.105.69 with SMTP id gk5ls671162qeb.57.gmail; Thu, 15 Aug 2013 19:28:29 -0700 (PDT) X-Received: by 10.221.56.194 with SMTP id wd2mr17546284vcb.7.1376620109112; Thu, 15 Aug 2013 19:28:29 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id jf10si689137vdb.102.2013.08.15.19.28.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so1106565vcb.0 for ; Thu, 15 Aug 2013 19:28:29 -0700 (PDT) X-Gm-Message-State: ALoCoQk/kQUAY/thckTa4qJwWnuZfbxP3Tb8vMSeGM2vB1HC8Lio8icFbVu7JkrTlL+9ZvXS0AJe X-Received: by 10.58.198.13 with SMTP id iy13mr17331286vec.11.1376620109018; Thu, 15 Aug 2013 19:28:29 -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 u4csp45217vcz; Thu, 15 Aug 2013 19:28:28 -0700 (PDT) X-Received: by 10.68.211.194 with SMTP id ne2mr18904237pbc.40.1376620108130; Thu, 15 Aug 2013 19:28:28 -0700 (PDT) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx.google.com with ESMTPS id gx9si64710pac.98.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.178 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id w10so1594836pde.37 for ; Thu, 15 Aug 2013 19:28:27 -0700 (PDT) X-Received: by 10.66.149.231 with SMTP id ud7mr710502pab.8.1376620107713; Thu, 15 Aug 2013 19:28:27 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id tr10sm2695230pbc.22.2013.08.15.19.28.22 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:27 -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 , "David S. Miller" Subject: [PATCH 21/34] cpufreq: p4-clockmod: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:18 +0530 Message-Id: <8c2100acd7fa6583aa9b9a5e843f0c1008a377ab.1376619363.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.220.169 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: David S. Miller Signed-off-by: Viresh Kumar --- drivers/cpufreq/p4-clockmod.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c index 3c23053..3d1cba9 100644 --- a/drivers/cpufreq/p4-clockmod.c +++ b/drivers/cpufreq/p4-clockmod.c @@ -107,15 +107,8 @@ static struct cpufreq_frequency_table p4clockmod_table[] = { static int cpufreq_p4_target(struct cpufreq_policy *policy, unsigned int index) { - struct cpufreq_freqs freqs; int i; - freqs.old = cpufreq_p4_get(policy->cpu); - freqs.new = stock_freq * p4clockmod_table[index].driver_data / 8; - - /* notifiers */ - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - /* run on each logical CPU, * see section 13.15.3 of IA32 Intel Architecture Software * Developer's Manual, Volume 3 @@ -123,9 +116,6 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy, unsigned int index) for_each_cpu(i, policy->cpus) cpufreq_p4_setdc(i, p4clockmod_table[index].driver_data); - /* notifiers */ - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - return 0; }