From patchwork Fri Aug 16 02:25:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2845436 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7B3F89F239 for ; Fri, 16 Aug 2013 02:58:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64E5320284 for ; Fri, 16 Aug 2013 02:58:23 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5DC252027F for ; Fri, 16 Aug 2013 02:58:22 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA9n4-00048L-Si; Fri, 16 Aug 2013 02:29:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA9mD-0006lt-O4; Fri, 16 Aug 2013 02:28:33 +0000 Received: from mail-pd0-f169.google.com ([209.85.192.169]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA9lF-0006Zb-5l for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2013 02:27:36 +0000 Received: by mail-pd0-f169.google.com with SMTP id r10so1602436pdi.0 for ; Thu, 15 Aug 2013 19:27:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=xNHRVxCcb/8z8mC2ylj+lx98WDF3lPZ4xi3J6L2+sek=; b=JHOVxJSnH0kR02d3zKPBexE6tWn2C2VgJ6rSHXMFoSabT4EvJ35ki1SSG8oPtppLnb ktDHzETfnsH4UsQfiEYMdSleh27ML38Y1xNQXlZMXYSGpSg5lJ9zKtXZs0rCjhsHPyvA HQ2DFJcIkk0E2uCKqanTKoA4fAUb28csnjZ1UCdMdWsK/wfYrG/LqjKphnlnVgzKsi4i GKNCF8IfHlEnO3f62nyNrWYk1dbKLtnYw695xWPckJspwJ4dxzgnBEpREmrVIHhaJLQI CufygtRz47dj+jLEscvxA0cCEmR7r9bo449KelOViBe8YfEDst+5fEAOxu/RvqBi3h+H wKLA== X-Gm-Message-State: ALoCoQloShLAwLx2+pjES+ptHp22ELPhcspUXXnpGQFsWyDIy/MBgEGYcB+fVafPbB5kEY91EkZR X-Received: by 10.68.160.5 with SMTP id xg5mr283959pbb.173.1376620032129; Thu, 15 Aug 2013 19:27:12 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id vz4sm107763pab.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:11 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 11/34] cpufreq: elanfreq: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:08 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130815_222733_493580_F064E8DC X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: -1.9 (-) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Viresh Kumar --- drivers/cpufreq/elanfreq.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index 4ab4153..de08acf 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c @@ -108,17 +108,6 @@ static unsigned int elanfreq_get_cpu_frequency(unsigned int cpu) static int elanfreq_target(struct cpufreq_policy *policy, unsigned int state) { - struct cpufreq_freqs freqs; - - freqs.old = elanfreq_get_cpu_frequency(0); - freqs.new = elan_multiplier[state].clock; - - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - - printk(KERN_INFO "elanfreq: attempting to set frequency to %i kHz\n", - elan_multiplier[state].clock); - - /* * Access to the Elan's internal registers is indexed via * 0x22: Chip Setup & Control Register Index Register (CSCI) @@ -149,8 +138,6 @@ static int elanfreq_target(struct cpufreq_policy *policy, udelay(10000); local_irq_enable(); - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - return 0; } /*