From patchwork Fri Sep 13 13:02:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20261 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0909420358 for ; Fri, 13 Sep 2013 13:27:42 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf1258438yhz.3 for ; Fri, 13 Sep 2013 06:27:41 -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=46u9375d9ZbIB8cpbbseQXGG0LWhCsZbCuSCbjCyT3w=; b=kKGMd2+rwVCjr8S3ityYtIbmbz77dtfoeG6HW1XKRozTvXRzpJwrcypi7+nv2v4YYR W3s35xTglUHNnKjEG0GW46yR35xADoieoaDVk60gLt3vTrF5lGOOQSYyycygk11a3HbN PPsm6uZxU8jo567yGIhY4DBtP44jF3JJppzwaLYfl+aG+QiT8vGukQsmaHwc95QvNzO8 LQj5SHfIBiLyqKQ95yJLv7p/f1iB7HzlKuRYIzunrERgvidnG53wPmdXaBTVIZrrzu29 51fc6gpq9BMXTlMOWKaHilhOGzvrUzp9EJvPvMOI0IvteLi8ufskmDuXeOxrNBnr/E+4 sK2A== X-Gm-Message-State: ALoCoQlObpgeZIHVfTcSsXiJd3jRLXW9gFgbNHlsx4QHbYJLMoOpF4hHJsUxAsEaZ9yec48zDMfY X-Received: by 10.236.19.225 with SMTP id n61mr4973270yhn.8.1379078861771; Fri, 13 Sep 2013 06:27:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.25.66 with SMTP id a2ls1119564qeg.95.gmail; Fri, 13 Sep 2013 06:27:41 -0700 (PDT) X-Received: by 10.52.94.37 with SMTP id cz5mr1423068vdb.30.1379078861568; Fri, 13 Sep 2013 06:27:41 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id sc5si3100465vdc.152.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:27:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id oy12so942167veb.41 for ; Fri, 13 Sep 2013 06:27:41 -0700 (PDT) X-Received: by 10.220.164.202 with SMTP id f10mr1701625vcy.25.1379078861493; Fri, 13 Sep 2013 06:27:41 -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 u4csp80730vcz; Fri, 13 Sep 2013 06:27:40 -0700 (PDT) X-Received: by 10.68.228.201 with SMTP id sk9mr13619082pbc.4.1379078860400; Fri, 13 Sep 2013 06:27:40 -0700 (PDT) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by mx.google.com with ESMTPS id vs3si11277475pab.27.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:27:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.44 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.44; Received: by mail-pb0-f44.google.com with SMTP id xa7so1232951pbc.31 for ; Fri, 13 Sep 2013 06:27:40 -0700 (PDT) X-Received: by 10.68.191.72 with SMTP id gw8mr13634814pbc.92.1379078859971; Fri, 13 Sep 2013 06:27:39 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ef10sm18142761pac.1.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:27:39 -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 207/228] cpufreq: sc520: remove calls to cpufreq_notify_transition() Date: Fri, 13 Sep 2013 18:32:33 +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.128.182 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; }