From patchwork Fri Sep 13 12:59:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20059 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 D345D202E6 for ; Fri, 13 Sep 2013 13:03:38 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf1223482yhz.11 for ; Fri, 13 Sep 2013 06:03:38 -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=ysOcLHQXMSlRUoQ/PJtmIx/67QjYy0AUt7aCHu2rQY4=; b=lXw+OoQvmA1RR8nf/bDmXJ8IJwZUgPeIJbXBbKdiIsPzbabjCqL1GFy6b1df8xEeon cDVoKiaWM6r9RXzeq8Hm/g4b6KXxGMIk/jQEWN1/qpVCDyN+t+AQv/Ys2nduSIatv1zk 4vSnDrMsH5TBQk4unrs0ay8ZMNZzW8C0HlVu/l4qZ2oJBNXu1Buw0z66BGXMTsjODrYG 5FJsf7cxm9P6IRw7lFXTJBkziDCy4YuJ37xHnmIXfO8Ba+wLXLcqI0vmFi9SDIhDEOYG 3JBNMbZ6vyLy9mvH9lJrpFvzevJz7Sc+c4YOWcset40soPk00b0WbZ82+7djn1UuL6zy uj5g== X-Gm-Message-State: ALoCoQl7HLawjL3CDPXKL53kjKKxR/AXtPfci5hpC8zJlru7+MakCvLTVBpqbQ7KWKopC+ZKmpx4 X-Received: by 10.59.7.228 with SMTP id df4mr934593ved.35.1379077418495; Fri, 13 Sep 2013 06:03:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.2.166 with SMTP id 6ls1119307qev.69.gmail; Fri, 13 Sep 2013 06:03:38 -0700 (PDT) X-Received: by 10.220.11.7 with SMTP id r7mr11978348vcr.12.1379077418274; Fri, 13 Sep 2013 06:03:38 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id mq14si3081105vcb.131.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so919511vcb.0 for ; Fri, 13 Sep 2013 06:03:38 -0700 (PDT) X-Received: by 10.220.144.68 with SMTP id y4mr722064vcu.28.1379077418110; Fri, 13 Sep 2013 06:03:38 -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 u4csp79405vcz; Fri, 13 Sep 2013 06:03:36 -0700 (PDT) X-Received: by 10.66.142.42 with SMTP id rt10mr15045300pab.1.1379077416142; Fri, 13 Sep 2013 06:03:36 -0700 (PDT) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id dl5si1950123pbd.116.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.53; Received: by mail-pa0-f53.google.com with SMTP id lb1so2489287pab.26 for ; Fri, 13 Sep 2013 06:03:35 -0700 (PDT) X-Received: by 10.68.178.100 with SMTP id cx4mr4174177pbc.40.1379077415643; Fri, 13 Sep 2013 06:03:35 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id dw3sm11648389pbc.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03: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 005/228] cpufreq: rename __cpufreq_set_policy() as cpufreq_set_policy() Date: Fri, 13 Sep 2013 18:29:11 +0530 Message-Id: <42ae34cf2b26098569d74980321fe3680fe81c48.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.220.169 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: , Earlier there used to be two functions named __cpufreq_set_policy() and cpufreq_set_policy(), but now we only have a single routine lets name it cpufreq_set_policy() instead of __cpufreq_set_policy(). This also removes some invalid comments or fixes some incorrect comments. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index e217d8f..d5fb343 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -457,7 +457,7 @@ show_one(scaling_min_freq, min); show_one(scaling_max_freq, max); show_one(scaling_cur_freq, cur); -static int __cpufreq_set_policy(struct cpufreq_policy *policy, +static int cpufreq_set_policy(struct cpufreq_policy *policy, struct cpufreq_policy *new_policy); /** @@ -478,7 +478,7 @@ static ssize_t store_##file_name \ if (ret != 1) \ return -EINVAL; \ \ - ret = __cpufreq_set_policy(policy, &new_policy); \ + ret = cpufreq_set_policy(policy, &new_policy); \ policy->user_policy.object = policy->object; \ \ return ret ? ret : count; \ @@ -536,11 +536,7 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy, &new_policy.governor)) return -EINVAL; - /* - * Do not use cpufreq_set_policy here or the user_policy.max - * will be wrongly overridden - */ - ret = __cpufreq_set_policy(policy, &new_policy); + ret = cpufreq_set_policy(policy, &new_policy); policy->user_policy.policy = policy->policy; policy->user_policy.governor = policy->governor; @@ -887,11 +883,11 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy) int ret = 0; memcpy(&new_policy, policy, sizeof(*policy)); - /* assure that the starting sequence is run in __cpufreq_set_policy */ + /* assure that the starting sequence is run in cpufreq_set_policy */ policy->governor = NULL; /* set default policy */ - ret = __cpufreq_set_policy(policy, &new_policy); + ret = cpufreq_set_policy(policy, &new_policy); policy->user_policy.policy = policy->policy; policy->user_policy.governor = policy->governor; @@ -1932,10 +1928,10 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu) EXPORT_SYMBOL(cpufreq_get_policy); /* - * data : current policy. - * policy : policy to be set. + * policy : current policy. + * new_policy: policy to be set. */ -static int __cpufreq_set_policy(struct cpufreq_policy *policy, +static int cpufreq_set_policy(struct cpufreq_policy *policy, struct cpufreq_policy *new_policy) { int ret = 0, failed = 1; @@ -2084,7 +2080,7 @@ int cpufreq_update_policy(unsigned int cpu) } } - ret = __cpufreq_set_policy(policy, &new_policy); + ret = cpufreq_set_policy(policy, &new_policy); unlock_policy_rwsem_write(cpu);