From patchwork Wed Aug 14 13:32:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19139 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DD4B22390D for ; Wed, 14 Aug 2013 13:36:04 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hf12sf6309369vcb.3 for ; Wed, 14 Aug 2013 06:36:04 -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=yUzv0JiR3iXY7NvAMdAgciS9Q9/DDHMt+88IWNzdP78=; b=Q1/EYK48EEueOOSnCTqdbzvGsKd/nGCnHdkGgIJOyYJdgFRlIkeYwIhZJcSb9xCpvY R1uoC/XGBqOHDBHdb0x/Ed1OUZ7Hbew3pqVw3My6UZ15kI9BRmtb+kWkhhazUJ2WNKaw v675dCWYvyrTZ33h2EizhQ3sbr88pMiSQErCDTC1q8IPjjSi+aQlKg3DD9OWtY3O9PVZ ttCKJDKEcToCPnxq1KMpsMgUEidtTQLX51TzpSFK8gWxFvSZ2REepaZQKVd7tG5s731Z kvENOkeHKeLj7Xjyz7MFFnI0DpWgdq+Oq7RIDuR3gSXtDhmbltptMN2VjeQzSQXNZmdX JiNQ== X-Received: by 10.59.5.72 with SMTP id ck8mr2153329ved.35.1376487364679; Wed, 14 Aug 2013 06:36:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.88.38 with SMTP id bd6ls3270045qeb.29.gmail; Wed, 14 Aug 2013 06:36:04 -0700 (PDT) X-Received: by 10.52.249.102 with SMTP id yt6mr1079294vdc.21.1376487364558; Wed, 14 Aug 2013 06:36:04 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id vv9si1629055vec.43.2013.08.14.06.36.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:36:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.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.128.169; Received: by mail-ve0-f169.google.com with SMTP id db10so7765750veb.28 for ; Wed, 14 Aug 2013 06:36:04 -0700 (PDT) X-Gm-Message-State: ALoCoQktfcONofAu6voGqXOYRqMIGeuVbR4+Ia9X6kL5WVApdSjsLoVoLTuvPYx9+NKqf7qau9NG X-Received: by 10.52.89.197 with SMTP id bq5mr75059vdb.65.1376487364472; Wed, 14 Aug 2013 06:36:04 -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 u4csp213232vcz; Wed, 14 Aug 2013 06:36:03 -0700 (PDT) X-Received: by 10.68.163.131 with SMTP id yi3mr10037057pbb.55.1376487363544; Wed, 14 Aug 2013 06:36:03 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id hk5si7541653pac.183.2013.08.14.06.36.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:36:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id p10so6352993pdj.32 for ; Wed, 14 Aug 2013 06:36:03 -0700 (PDT) X-Received: by 10.68.203.105 with SMTP id kp9mr10062016pbc.78.1376487363144; Wed, 14 Aug 2013 06:36:03 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ll5sm53366358pab.19.2013.08.14.06.35.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:36:02 -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, Viresh Kumar Subject: [PATCH 26/37] cpufreq: powernow: don't initialize part of policy that is set by core too Date: Wed, 14 Aug 2013 19:02:15 +0530 Message-Id: <65b1af50f727870c124ed102cf4ef1c7e7417664.1376486713.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.128.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: , Many common initializations of struct policy are moved to core now and hence this driver doesn't need to do it. This patch removes such code. Most recent of those changes is to call ->get() in the core after calling ->init(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernow-k6.c | 1 - drivers/cpufreq/powernow-k7.c | 2 -- drivers/cpufreq/powernow-k8.c | 3 --- 3 files changed, 6 deletions(-) diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c index cb19fb8..643e795 100644 --- a/drivers/cpufreq/powernow-k6.c +++ b/drivers/cpufreq/powernow-k6.c @@ -126,7 +126,6 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 200000; - policy->cur = busfreq * max_multiplier; return cpufreq_table_validate_and_show(policy, clock_ratio); } diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index 7c76f03..946708a 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c @@ -659,8 +659,6 @@ static int powernow_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = cpufreq_scale(2000000UL, fsb, latency); - policy->cur = powernow_get(0); - return cpufreq_table_validate_and_show(policy, powernow_table); } diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index 80bc606..62a1ce4 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -1133,9 +1133,6 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol) cpumask_copy(pol->cpus, cpu_core_mask(pol->cpu)); data->available_cores = pol->cpus; - pol->cur = find_khz_freq_from_fid(data->currfid); - pr_debug("policy current frequency %d kHz\n", pol->cur); - /* min/max the cpu is capable of */ if (cpufreq_table_validate_and_show(pol, data->powernow_table)) { printk(KERN_ERR FW_BUG PFX "invalid powernow_table\n");