From patchwork Fri Aug 16 02:25:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19192 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B13AC2486D for ; Fri, 16 Aug 2013 02:28:13 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf1699789vbg.8 for ; Thu, 15 Aug 2013 19:28:13 -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=4CR/Q1GIZx+vNl/biVHJIwRBOQ5w2Qv+xz8ShifY56w=; b=L5AFmm5luFvFlz76R7zBQg3Mi0WG6/ONC0J2IJotdlMEDc3S01mMnz4We+pvaS9KgR 1dPsvAYf3zPEa6hx7VeMKn4YsYGf8WqdDr7O8EscDhRSh1TIfH315LvCYWHa81aEip68 pAHdt/ZMQLvQxxAuBVoQYrZnfymwOA56GCUg7cCyGDJiJZHVMLu9pJ3MddOYlNdjHhUs b9RznT1qL/MkLw0XypJUfo87U39ZRIkYZ3zMLttztpH3t7+oQ2KtEUvrDvfr0ODBoHmD PteA/pkr5rYpc4NDomQ0WLBUG1nGNstjt2ZN4xJbzyryT+Fej67ZFV2ff71Y4/i6U+t1 OqJA== X-Received: by 10.58.216.100 with SMTP id op4mr6292572vec.15.1376620093483; Thu, 15 Aug 2013 19:28:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.97.197 with SMTP id ec5ls606356qeb.26.gmail; Thu, 15 Aug 2013 19:28:13 -0700 (PDT) X-Received: by 10.52.120.7 with SMTP id ky7mr14606312vdb.12.1376620093341; Thu, 15 Aug 2013 19:28:13 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id xb6si646126vdb.146.2013.08.15.19.28.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 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.175; Received: by mail-vc0-f175.google.com with SMTP id ia10so1062360vcb.6 for ; Thu, 15 Aug 2013 19:28:13 -0700 (PDT) X-Gm-Message-State: ALoCoQkfkmw/wbwayK6myk3kRftTa/XfPFrae8vrLrx0QpFlHLCUgqYJ/PFI4G95Wo6q683RYA9Q X-Received: by 10.58.76.130 with SMTP id k2mr3665765vew.24.1376620093261; Thu, 15 Aug 2013 19:28:13 -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 u4csp45208vcz; Thu, 15 Aug 2013 19:28:12 -0700 (PDT) X-Received: by 10.68.52.10 with SMTP id p10mr18774557pbo.92.1376620092463; Thu, 15 Aug 2013 19:28:12 -0700 (PDT) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx.google.com with ESMTPS id tg10si1820854pbc.87.2013.08.15.19.28.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.46; Received: by mail-pa0-f46.google.com with SMTP id fa1so1339985pad.19 for ; Thu, 15 Aug 2013 19:28:12 -0700 (PDT) X-Received: by 10.68.213.135 with SMTP id ns7mr18779150pbc.5.1376620092112; Thu, 15 Aug 2013 19:28:12 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id sz6sm125270pab.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:11 -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 19/34] cpufreq: maple: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:16 +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.220.175 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 b508147..45db7a2 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)