From patchwork Wed Aug 14 13:32:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19127 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 426AD2390D for ; Wed, 14 Aug 2013 13:34:41 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf6858032ves.2 for ; Wed, 14 Aug 2013 06:34:41 -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=lNJRK3nwTTLQF4VhN4To9/yfO0XIYZOrEXDO+OdxGEM=; b=dNDitBTI8pt15KvkQPU0FyyteB6HV3dfpTmOFcd5S1gsFYNnF8km9/V7mjRgBXcO8r ntFMfz4Zc6hC1tRLsl7FWVecOuFuoiBRnxMN+3/GRzRQeBiKQdJLkc4AC7x2RNqy6Ayr y1yM5ct32rhi1Y52BXZnuCHXPz0QGZGI4KyHSLZwYR0l5ePVasHkEW9GntyhGBMPMNvg hUVvYGfWQNOOsm5j02R+IX40AC4T9dFxsGb8EDBbOSaBA5tYZT1rsnDQnxcUWHzfZbM4 A3MiuYS8AVqIXJ/S9X12eHIAKXIIWBxmRFLvBPYldFCylEqpGhoQORKjbnJMW5TE5j7g jDzQ== X-Received: by 10.58.46.114 with SMTP id u18mr2517436vem.22.1376487281038; Wed, 14 Aug 2013 06:34:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.81.244 with SMTP id d20ls3290501qey.38.gmail; Wed, 14 Aug 2013 06:34:40 -0700 (PDT) X-Received: by 10.220.110.202 with SMTP id o10mr9489215vcp.1.1376487280884; Wed, 14 Aug 2013 06:34:40 -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 o7si11032484vet.17.2013.08.14.06.34.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:34:40 -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 kw10so5165375vcb.29 for ; Wed, 14 Aug 2013 06:34:40 -0700 (PDT) X-Gm-Message-State: ALoCoQlGj7mtKsBY8V1wj4gx22HGDwWvYsZ6VCtyW71f6x9/3F4xy8v8vRMHPNsscotG/wcCTdnD X-Received: by 10.52.117.79 with SMTP id kc15mr87296vdb.45.1376487280784; Wed, 14 Aug 2013 06:34:40 -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 u4csp213126vcz; Wed, 14 Aug 2013 06:34:40 -0700 (PDT) X-Received: by 10.69.0.168 with SMTP id az8mr9956833pbd.51.1376487279930; Wed, 14 Aug 2013 06:34:39 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id to1si29376322pab.254.2013.08.14.06.34.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:34:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.50; Received: by mail-pa0-f50.google.com with SMTP id fb10so10004831pad.23 for ; Wed, 14 Aug 2013 06:34:39 -0700 (PDT) X-Received: by 10.68.164.1 with SMTP id ym1mr10054931pbb.33.1376487279543; Wed, 14 Aug 2013 06:34:39 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id wr9sm50386118pbc.7.2013.08.14.06.34.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 Aug 2013 06:34:38 -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 14/37] cpufreq: gx: don't initialize part of policy that is set by core too Date: Wed, 14 Aug 2013 19:02:03 +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.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/gx-suspmod.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/cpufreq/gx-suspmod.c b/drivers/cpufreq/gx-suspmod.c index 70442c7..d83e826 100644 --- a/drivers/cpufreq/gx-suspmod.c +++ b/drivers/cpufreq/gx-suspmod.c @@ -401,7 +401,7 @@ static int cpufreq_gx_target(struct cpufreq_policy *policy, static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy) { - unsigned int maxfreq, curfreq; + unsigned int maxfreq; if (!policy || policy->cpu != 0) return -ENODEV; @@ -415,10 +415,8 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy) maxfreq = 30000 * gx_freq_mult[getCx86(CX86_DIR1) & 0x0f]; stock_freq = maxfreq; - curfreq = gx_get_cpuspeed(0); pr_debug("cpu max frequency is %d.\n", maxfreq); - pr_debug("cpu current frequency is %dkHz.\n", curfreq); /* setup basic struct for cpufreq API */ policy->cpu = 0; @@ -428,7 +426,6 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy) else policy->min = maxfreq / POLICY_MIN_DIV; policy->max = maxfreq; - policy->cur = curfreq; policy->cpuinfo.min_freq = maxfreq / max_duration; policy->cpuinfo.max_freq = maxfreq; policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;