From patchwork Fri Aug 16 02:25: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: 19191 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 406F32486D for ; Fri, 16 Aug 2013 02:28:06 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id a11sf1711159qcx.9 for ; Thu, 15 Aug 2013 19:28:06 -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=iuY09oTk7kchHhAzHS5yS82RvtsaTlzK73kFj2h7eqY=; b=QUxsR3fnc5VbDjbeXeysMS07dwM0NxdgGvA7YXsGjwD+9CSjL3NMLHJty88JhvVFbA qE6OaELioY5P14twF3hN9McTqCAzHBKAAwj3ZQqmlCVpLxVxwMHVPY8MmE3PyJ27Bu8r DYGRD6lyZkvqMbMsQ1Wy0kWN31VfzW/jM9UhtGz7eH/RlX6LM1sxq7k1hYuaTktbvguL x6Mw6pMddxxv/Tz1VkIbCmgkmWkKPZYVspdolWeyN79EVy2uLq6Cy3X7+f6IrhZ+/fZJ spkFuxkDxFk76gAXAxiZJG3lwaIEauQte9i+MVG0YlyWeXIs0nr9aLDMhiEh4kPK3WCB 8hKA== X-Received: by 10.58.206.33 with SMTP id ll1mr5742021vec.10.1376620085870; Thu, 15 Aug 2013 19:28:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.10 with SMTP id d10ls628731qej.19.gmail; Thu, 15 Aug 2013 19:28:05 -0700 (PDT) X-Received: by 10.221.51.206 with SMTP id vj14mr17375754vcb.17.1376620085719; Thu, 15 Aug 2013 19:28:05 -0700 (PDT) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id b6si688874veo.98.2013.08.15.19.28.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id g17so1268896vbg.0 for ; Thu, 15 Aug 2013 19:28:05 -0700 (PDT) X-Gm-Message-State: ALoCoQkRXY3f3QdfUyvMUMgFQa75okj39DZfd1bpVxRcT92xiOS/SNHiuCnhcj3inB0D8ZfnNUxl X-Received: by 10.58.155.68 with SMTP id vu4mr11392882veb.21.1376620085635; Thu, 15 Aug 2013 19:28:05 -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 u4csp45207vcz; Thu, 15 Aug 2013 19:28:05 -0700 (PDT) X-Received: by 10.66.171.77 with SMTP id as13mr282944pac.170.1376620084789; Thu, 15 Aug 2013 19:28:04 -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 xq4si41715pab.202.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:04 -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 uo5so1471682pbc.37 for ; Thu, 15 Aug 2013 19:28:04 -0700 (PDT) X-Received: by 10.66.122.41 with SMTP id lp9mr707234pab.6.1376620084441; Thu, 15 Aug 2013 19:28:04 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id qv4sm2691782pbc.16.2013.08.15.19.28.00 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:03 -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 18/34] cpufreq: loongson2: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:15 +0530 Message-Id: <4bd67c506fc1b3deb79dd33f62e85800dd94e7e0.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.212.41 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 c33347c..6232d29 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; }