From patchwork Wed Aug 14 13:32:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19137 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 699642390D for ; Wed, 14 Aug 2013 13:35:50 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id n1sf10987966qcx.7 for ; Wed, 14 Aug 2013 06:35:50 -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=f04CFLbwF+137NUZARnQQopKLu8DMP4DwXoaN9uPUZc=; b=Cysy53+R7RiS2ZrevanPfakEDh5G4eiyMu581trbbqjlshu++tp4bP+A+sIY21t0rz ldtJwN+6aZLAy2hQl2sk/zt7AgQoa3gfkl+221YFXHrTRbzCn00+nnkx489cYzj2qlQD pWra6l+m2h98BQIbYgJSbVqzr+f7sdjapvNdqPGxoaEjQhkGvs3PWTRiHr2iJRS8Gnzj 0X4FGmtbcJu/aNxD0okp/FyD/Hz122NotBDewVote3qIGey18O3Nc3RqgoGX1VZfqpVK PGYlslbWl4n+Mt2LRhe/9NUo2fsXdEcFgXLkR9i9A6SWjGsWQEwoRzjsbH3kSYMl1SG6 ksSw== X-Received: by 10.52.74.68 with SMTP id r4mr2154161vdv.0.1376487350169; Wed, 14 Aug 2013 06:35:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.168 with SMTP id jx8ls2831876qeb.34.gmail; Wed, 14 Aug 2013 06:35:50 -0700 (PDT) X-Received: by 10.58.233.173 with SMTP id tx13mr454215vec.31.1376487350086; Wed, 14 Aug 2013 06:35:50 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id fw17si11026196vec.104.2013.08.14.06.35.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:35:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 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.170; Received: by mail-vc0-f170.google.com with SMTP id kw10so5166930vcb.29 for ; Wed, 14 Aug 2013 06:35:50 -0700 (PDT) X-Gm-Message-State: ALoCoQk3f0ixOw1yW6t6oYH44c+18QbXmcjZtsiLEYYo6atgsmQaPJedl8AiB2c2Zx4SMmPg0P5y X-Received: by 10.52.164.102 with SMTP id yp6mr8448031vdb.14.1376487350001; Wed, 14 Aug 2013 06:35:50 -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 u4csp213213vcz; Wed, 14 Aug 2013 06:35:49 -0700 (PDT) X-Received: by 10.68.197.136 with SMTP id iu8mr1150371pbc.183.1376487349172; Wed, 14 Aug 2013 06:35:49 -0700 (PDT) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id gx9si29375767pac.272.2013.08.14.06.35.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:35:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.54; Received: by mail-pa0-f54.google.com with SMTP id kx10so4601369pab.13 for ; Wed, 14 Aug 2013 06:35:48 -0700 (PDT) X-Received: by 10.68.137.231 with SMTP id ql7mr9982136pbb.37.1376487348802; Wed, 14 Aug 2013 06:35:48 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id nv6sm50393008pbc.6.2013.08.14.06.35.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:35:48 -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 24/37] cpufreq: pcc: don't initialize part of policy that is set by core too Date: Wed, 14 Aug 2013 19:02:13 +0530 Message-Id: <2201d8d70aca12a790f000333825353521fee1a7.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.220.170 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/pcc-cpufreq.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index d81c4e5..0624bee 100644 --- a/drivers/cpufreq/pcc-cpufreq.c +++ b/drivers/cpufreq/pcc-cpufreq.c @@ -560,13 +560,6 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy) ioread32(&pcch_hdr->nominal) * 1000; policy->min = policy->cpuinfo.min_freq = ioread32(&pcch_hdr->minimum_frequency) * 1000; - policy->cur = pcc_get_freq(cpu); - - if (!policy->cur) { - pr_debug("init: Unable to get current CPU frequency\n"); - result = -EINVAL; - goto out; - } pr_debug("init: policy->max is %d, policy->min is %d\n", policy->max, policy->min);