From patchwork Wed Aug 14 13:32:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19130 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B81A52390D for ; Wed, 14 Aug 2013 13:35:02 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id 9sf1999169qea.10 for ; Wed, 14 Aug 2013 06:35:02 -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=09GAhMtqv21r7D82vmjuHjXnfVMxstF3/iRXmWRkKM8=; b=RvdT9hJt1IFSeL7f5PzEJd1HWc5lwUlo3F0U02UYqICXtAMHRKrNwMPHsaANZypmxf SEwkb4QiDVMAASPwYIwmW0qmMKIQH3Is9H1jYJA6dyjyrFcOhDNlxbkt0TFaCEN2Gm3S 1+/qEpan0YhMikcafpYt8xCyZzRjFp8UR6vWozg7oebDT0gyLzhxLgifsyRNAc1Pt/Y6 ylWnyke56peNhRUeGXFYagvyvn7YATH9/kt6DBRhBO1h3ch+aLyo+PK6Z4X9iTtpc+tP UJxoeor5bUx1bS580a4vc5Pyzb9FiVsxHOqJItrpYF2UZaHpkB+xkYR8GW5z4cqc6MnN phEw== X-Received: by 10.59.11.2 with SMTP id ee2mr2253048ved.11.1376487302301; Wed, 14 Aug 2013 06:35:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.74.198 with SMTP id w6ls3113213qev.9.gmail; Wed, 14 Aug 2013 06:35:02 -0700 (PDT) X-Received: by 10.58.155.37 with SMTP id vt5mr112990veb.41.1376487302097; Wed, 14 Aug 2013 06:35:02 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id s15si11030902vcn.29.2013.08.14.06.35.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:35:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 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.173; Received: by mail-ve0-f173.google.com with SMTP id cy12so7706972veb.32 for ; Wed, 14 Aug 2013 06:35:02 -0700 (PDT) X-Gm-Message-State: ALoCoQlU4cDuF3ruzIFg4/CyItcRPQ3JB7zdedV4tWXQGmzXDG8R5laRA6vjCAFQSNrsbXi0iubY X-Received: by 10.58.97.138 with SMTP id ea10mr110602veb.38.1376487302022; Wed, 14 Aug 2013 06:35:02 -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 u4csp213151vcz; Wed, 14 Aug 2013 06:35:01 -0700 (PDT) X-Received: by 10.66.146.199 with SMTP id te7mr10028682pab.106.1376487301123; Wed, 14 Aug 2013 06:35:01 -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 aq4si28268269pbd.146.2013.08.14.06.35.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:35:01 -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 xa7so9324900pbc.31 for ; Wed, 14 Aug 2013 06:35:00 -0700 (PDT) X-Received: by 10.68.135.101 with SMTP id pr5mr998538pbb.196.1376487300705; Wed, 14 Aug 2013 06:35:00 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ef10sm53399901pac.1.2013.08.14.06.34.57 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:35:00 -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 , Russell King Subject: [PATCH 17/37] cpufreq: integrator: don't initialize part of policy that is set by core too Date: Wed, 14 Aug 2013 19:02:06 +0530 Message-Id: <9f337589aed2e258907bf1fd3de5ff87d02aaa12.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.173 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(). Cc: Russell King Signed-off-by: Viresh Kumar --- drivers/cpufreq/integrator-cpufreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/integrator-cpufreq.c b/drivers/cpufreq/integrator-cpufreq.c index f7c99df..6391dd3 100644 --- a/drivers/cpufreq/integrator-cpufreq.c +++ b/drivers/cpufreq/integrator-cpufreq.c @@ -186,10 +186,9 @@ static int integrator_cpufreq_init(struct cpufreq_policy *policy) { /* set default policy and cpuinfo */ - policy->cpuinfo.max_freq = 160000; - policy->cpuinfo.min_freq = 12000; + policy->max = policy->cpuinfo.max_freq = 160000; + policy->min = policy->cpuinfo.min_freq = 12000; policy->cpuinfo.transition_latency = 1000000; /* 1 ms, assumed */ - policy->cur = policy->min = policy->max = integrator_get(policy->cpu); return 0; }