From patchwork Fri Aug 16 02:25:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19203 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3788D2486D for ; Fri, 16 Aug 2013 02:29:38 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oz10sf1868668veb.11 for ; Thu, 15 Aug 2013 19:29:37 -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=46u9375d9ZbIB8cpbbseQXGG0LWhCsZbCuSCbjCyT3w=; b=cJ4I27F6/4/8nN3a1cT/ihWlTxaqxCQJvk8mDxeKqNtk8c8kI3pWqlra00eQExj5na ql80vWoBC8lpcJvwuHl7heetAEZee+9AmRMLofPg6jHcqG5m4Z4qbXnI5hx2ebx5AblI BK0RxcMn+OdEwfpE0kq4AJokPzuKzDdPqSFXgSnQYsEtSzed/lG783dNE92sAmdBLeKZ wgizb6GJfIhk7QofXpvsNhmDVLODf5mJZAAD94leGAnb9zS0m72LuieISnQQ+/N0iFum 7hlmlU6cefN3LPQv1I9150wK6v9HI4Lqc2xjUiDibziO491x2uSKHdNwoM9XErfY6Zq3 oOPg== X-Received: by 10.236.77.135 with SMTP id d7mr342792yhe.49.1376620177901; Thu, 15 Aug 2013 19:29:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.83.7 with SMTP id m7ls611733qey.0.gmail; Thu, 15 Aug 2013 19:29:37 -0700 (PDT) X-Received: by 10.58.118.70 with SMTP id kk6mr17199996veb.1.1376620177769; Thu, 15 Aug 2013 19:29:37 -0700 (PDT) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id gq10si647055vdc.147.2013.08.15.19.29.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:29:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.49 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.49; Received: by mail-vb0-f49.google.com with SMTP id w16so1215996vbb.22 for ; Thu, 15 Aug 2013 19:29:37 -0700 (PDT) X-Gm-Message-State: ALoCoQl2atXVlYKqAzE2M8DTyucGo+uIWhLDCFK+XTUM0hBS+l0uCOh/F6J4XB8wvPV68F5lHrYm X-Received: by 10.52.115.102 with SMTP id jn6mr15041902vdb.18.1376620177677; Thu, 15 Aug 2013 19:29:37 -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 u4csp45275vcz; Thu, 15 Aug 2013 19:29:37 -0700 (PDT) X-Received: by 10.66.150.97 with SMTP id uh1mr600248pab.118.1376620176697; Thu, 15 Aug 2013 19:29:36 -0700 (PDT) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by mx.google.com with ESMTPS id yt8si86543pab.3.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:29:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.176 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.176; Received: by mail-pd0-f176.google.com with SMTP id q10so1593901pdj.35 for ; Thu, 15 Aug 2013 19:29:36 -0700 (PDT) X-Received: by 10.68.50.138 with SMTP id c10mr18894438pbo.136.1376620176308; Thu, 15 Aug 2013 19:29:36 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ia5sm2697060pbc.42.2013.08.15.19.29.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:29:35 -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 Subject: [PATCH 30/34] cpufreq: sc520: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:27 +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.212.49 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. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sc520_freq.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c index 6c86452..6adb354 100644 --- a/drivers/cpufreq/sc520_freq.c +++ b/drivers/cpufreq/sc520_freq.c @@ -56,17 +56,8 @@ static unsigned int sc520_freq_get_cpu_frequency(unsigned int cpu) static int sc520_freq_target(struct cpufreq_policy *policy, unsigned int state) { - struct cpufreq_freqs freqs; u8 clockspeed_reg; - freqs.old = sc520_freq_get_cpu_frequency(0); - freqs.new = sc520_freq_table[state].frequency; - - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - - pr_debug("attempting to set frequency to %i kHz\n", - sc520_freq_table[state].frequency); - local_irq_disable(); clockspeed_reg = *cpuctl & ~0x03; @@ -74,8 +65,6 @@ static int sc520_freq_target(struct cpufreq_policy *policy, unsigned int state) local_irq_enable(); - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - return 0; }