From patchwork Fri Sep 13 13:02:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20250 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BF03C20358 for ; Fri, 13 Sep 2013 13:26:23 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id c41sf1256941yho.0 for ; Fri, 13 Sep 2013 06:26:23 -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=45CgEgQFSUvM6eXmAXBYVzrnCHf6Qih5w2LeItPv+jA=; b=PlAD+abtkk3udiR03DH9hTeK+nxv9CIMVhaB2BETJkhP/+Kv6SIFxv38eWfiBTCXw2 KJTIzNZqdOWTQSvEAxgvjZjR5jvk3r+W8dTzIw6GsWRH4w2Og8k40xLkrome+GYWJkX/ JfBUqXJB4vFROIrE98AXry2MaEMySmXbEyQa6yUbwuG4GIV/UA8ahBN4UDTuJ4bRLnS3 d5fVkwERyzFze56gpmyYwPhYmE6xQ8HU+hszC/n0rTCYDRRToGgDcvtar8Ub4nrmosPM uzC5tSDz7G42RDh/nTDwg2XsBSf+Ol/Rwqj1FG/Ef4gY/T0q9BnqghF2pbKSaQWGmOCp OBVQ== X-Gm-Message-State: ALoCoQlsu6D0LYNEYxWJJFZUjFmGow5rqkMs8fBrN3KZ9woUDD3WhRzuG/Ub4ppvMwD0OFEpU7Fl X-Received: by 10.236.174.232 with SMTP id x68mr5175518yhl.42.1379078783523; Fri, 13 Sep 2013 06:26:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.41 with SMTP id i9ls1106951qen.44.gmail; Fri, 13 Sep 2013 06:26:23 -0700 (PDT) X-Received: by 10.221.47.193 with SMTP id ut1mr12014339vcb.8.1379078783266; Fri, 13 Sep 2013 06:26:23 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id zw10si3099898vdb.148.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 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.173; Received: by mail-ve0-f173.google.com with SMTP id cz12so940577veb.4 for ; Fri, 13 Sep 2013 06:26:23 -0700 (PDT) X-Received: by 10.220.10.194 with SMTP id q2mr11873732vcq.2.1379078783185; Fri, 13 Sep 2013 06:26:23 -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 u4csp80659vcz; Fri, 13 Sep 2013 06:26:22 -0700 (PDT) X-Received: by 10.66.159.40 with SMTP id wz8mr15423419pab.135.1379078781244; Fri, 13 Sep 2013 06:26:21 -0700 (PDT) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) by mx.google.com with ESMTPS id tb4si11204883pab.232.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.45 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.45; Received: by mail-pb0-f45.google.com with SMTP id mc17so1237010pbc.4 for ; Fri, 13 Sep 2013 06:26:20 -0700 (PDT) X-Received: by 10.67.24.7 with SMTP id ie7mr15154546pad.112.1379078780819; Fri, 13 Sep 2013 06:26:20 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id py4sm11752053pbb.33.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26:20 -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 , John Crispin Subject: [PATCH 196/228] cpufreq: loongson2: remove calls to cpufreq_notify_transition() Date: Fri, 13 Sep 2013 18:32:22 +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.173 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: John Crispin Signed-off-by: Viresh Kumar --- drivers/cpufreq/loongson2_cpufreq.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c index 41a8e2c..a436092 100644 --- a/drivers/cpufreq/loongson2_cpufreq.c +++ b/drivers/cpufreq/loongson2_cpufreq.c @@ -57,7 +57,6 @@ static int loongson2_cpufreq_target(struct cpufreq_policy *policy, { unsigned int cpu = policy->cpu; cpumask_t cpus_allowed; - struct cpufreq_freqs freqs; unsigned int freq; cpus_allowed = current->cpus_allowed; @@ -67,26 +66,11 @@ static int loongson2_cpufreq_target(struct cpufreq_policy *policy, ((cpu_clock_freq / 1000) * loongson2_clockmod_table[index].driver_data) / 8; - pr_debug("cpufreq: requested frequency %u Hz\n", - loongson2_clockmod_table[index].frequency * 1000); - - freqs.old = loongson2_cpufreq_get(cpu); - freqs.new = freq; - freqs.flags = 0; - - /* notifiers */ - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - set_cpus_allowed_ptr(current, &cpus_allowed); /* setting the cpu frequency */ clk_set_rate(cpuclk, freq); - /* notifiers */ - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - - pr_debug("cpufreq: set frequency %u kHz\n", freq); - return 0; }