From patchwork Fri Sep 13 13:02:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20251 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E36AA20358 for ; Fri, 13 Sep 2013 13:26:30 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id b4sf1237144qen.1 for ; Fri, 13 Sep 2013 06:26:30 -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=WmZB2fLA01uiQrh9+mXqO2RELN56fd4fkaQGke1cooY=; b=gRDHBs4/0iBt9ln+Fj1D9CE0bKgpq2mlmQwg0NluMpL96AxTyCpi8UdRxTYNJ2Ki2T C4EVOm2FYfU+N4cvqf1EXrT7prYz+lF92ppSqzWGoGGJOtik9vKC++7wOR1u5S0IKqDb QcBG3d9uKt+BD/hm5zMCvZx40JP/L7W9UQGVThqvjS4ib9Sd2qtl6K/MrS7Bb4EUhCuS Q3Rp4JVIViiLNdoy7I/ps/BQJGjvJDkWJRg8jwmavEOpPs0E1uGXtHXvaLsXldw9zcU7 ciA98JVjPUM9Mke9o62ml7qWmxS6jLkEO/ZxpR9a2QWsx8HefeGY8ZadYzfRF3UPAP6A biGw== X-Gm-Message-State: ALoCoQnj9pSLwDj+cKszHLJwk4eNL+0snlDS5ouqwi7+ju+1KgbB8yLLLeJkVPXOxx/gYY6lv/b2 X-Received: by 10.236.7.130 with SMTP id 2mr5133644yhp.4.1379078790452; Fri, 13 Sep 2013 06:26:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.70.228 with SMTP id p4ls1098826qeu.43.gmail; Fri, 13 Sep 2013 06:26:30 -0700 (PDT) X-Received: by 10.52.103.35 with SMTP id ft3mr10262911vdb.5.1379078790248; Fri, 13 Sep 2013 06:26:30 -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 jc7si3128954vdb.26.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26:30 -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 g17so936786vbg.28 for ; Fri, 13 Sep 2013 06:26:30 -0700 (PDT) X-Received: by 10.220.164.70 with SMTP id d6mr11841473vcy.19.1379078790148; Fri, 13 Sep 2013 06:26:30 -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 u4csp80663vcz; Fri, 13 Sep 2013 06:26:29 -0700 (PDT) X-Received: by 10.66.26.112 with SMTP id k16mr15177403pag.65.1379078789172; Fri, 13 Sep 2013 06:26:29 -0700 (PDT) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id tl4si11189008pac.282.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.52; Received: by mail-pa0-f52.google.com with SMTP id kq13so2522048pab.11 for ; Fri, 13 Sep 2013 06:26:28 -0700 (PDT) X-Received: by 10.68.132.71 with SMTP id os7mr2055395pbb.188.1379078788677; Fri, 13 Sep 2013 06:26:28 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id y5sm11771076pbs.18.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:26: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 , Dmitry Eremin-Solenikov Subject: [PATCH 197/228] cpufreq: maple: remove calls to cpufreq_notify_transition() Date: Fri, 13 Sep 2013 18:32:23 +0530 Message-Id: <72995afe8bf102bd36581fa4c59e14df2a119511.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.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: Dmitry Eremin-Solenikov Signed-off-by: Viresh Kumar --- drivers/cpufreq/maple-cpufreq.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c index 4e2da08..c4dfa42 100644 --- a/drivers/cpufreq/maple-cpufreq.c +++ b/drivers/cpufreq/maple-cpufreq.c @@ -69,8 +69,6 @@ static struct cpufreq_frequency_table maple_cpu_freqs[] = { */ static int maple_pmode_cur; -static DEFINE_MUTEX(maple_switch_mutex); - static const u32 *maple_pmode_data; static int maple_pmode_max; @@ -133,21 +131,7 @@ static int maple_scom_query_freq(void) static int maple_cpufreq_target(struct cpufreq_policy *policy, unsigned int index) { - struct cpufreq_freqs freqs; - int rc; - - mutex_lock(&maple_switch_mutex); - - freqs.old = maple_cpu_freqs[maple_pmode_cur].frequency; - freqs.new = maple_cpu_freqs[index].frequency; - - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - rc = maple_scom_switch_freq(index); - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - - mutex_unlock(&maple_switch_mutex); - - return rc; + return maple_scom_switch_freq(index); } static unsigned int maple_cpufreq_get_speed(unsigned int cpu)