From patchwork Fri Sep 13 13:02:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20253 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5375020358 for ; Fri, 13 Sep 2013 13:26:45 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id l13sf1211236qcy.5 for ; Fri, 13 Sep 2013 06:26:45 -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=S5tHJ4YeJStpwBttNsUKvMsK0waqx2vQOShDiFotvGE=; b=RUuxKRSW4yjxGPbZNRN+Lp1jWTV/s7W8C5Cnvc2bEN9RAbLzxtjrGW5qC0y64rRIRa G/NDU7Sc6ilfoPVu8xzW9wGjBZvfi3i8mALlonhkZS2g4qmloGG5ed9BuUoKPKWQDCYC d6w88CVuaN0uXKZKeTioHrjrHK4BPt6y19Tvi6/w89xsbzGMTOaFH2E0vv8x2xoYaQka y0Gmsc96NmLqUA5WBqvH2L99V8i4Gs9xJhy0THoGTBxt0zynu1bWzBxkyO7Rethzh0NG sYBVmxwNP2SujLFcufloIBEk+/0mdPBW2mE0z80GM2oEMOQ9jqk1cZ+njXwZZ0pMw1zy gGog== X-Gm-Message-State: ALoCoQmRYRemMMF/21AZ+PN0xXaqodh01r8P7v7Fg8CSyPYdv+XrQJW7CeDBwQY3/vz7mgvAYgO9 X-Received: by 10.236.24.195 with SMTP id x43mr5026075yhx.3.1379078804989; Fri, 13 Sep 2013 06:26:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.70.161 with SMTP id n1ls1184846qeu.27.gmail; Fri, 13 Sep 2013 06:26:44 -0700 (PDT) X-Received: by 10.220.43.19 with SMTP id u19mr11979459vce.3.1379078804729; Fri, 13 Sep 2013 06:26:44 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id dt10si3102658vdb.138.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 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.179; Received: by mail-vc0-f179.google.com with SMTP id ht10so929540vcb.10 for ; Fri, 13 Sep 2013 06:26:44 -0700 (PDT) X-Received: by 10.220.164.202 with SMTP id f10mr1697564vcy.25.1379078804636; Fri, 13 Sep 2013 06:26:44 -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 u4csp80677vcz; Fri, 13 Sep 2013 06:26:44 -0700 (PDT) X-Received: by 10.68.125.226 with SMTP id mt2mr13501065pbb.115.1379078803681; Fri, 13 Sep 2013 06:26:43 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id iv2si11177487pac.322.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.50; Received: by mail-pb0-f50.google.com with SMTP id uo5so1224459pbc.23 for ; Fri, 13 Sep 2013 06:26:43 -0700 (PDT) X-Received: by 10.68.247.36 with SMTP id yb4mr13561864pbc.138.1379078803285; Fri, 13 Sep 2013 06:26:43 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ry4sm18128197pab.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26:42 -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 199/228] cpufreq: p4-clockmod: remove calls to cpufreq_notify_transition() Date: Fri, 13 Sep 2013 18:32:25 +0530 Message-Id: <9c5d4a95b899267178c9383ca2ce81152f98c824.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.220.179 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; }