From patchwork Fri Sep 13 13:00:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20157 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 935CF20358 for ; Fri, 13 Sep 2013 13:15:15 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf1242308yhz.3 for ; Fri, 13 Sep 2013 06:15:15 -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=lNJRK3nwTTLQF4VhN4To9/yfO0XIYZOrEXDO+OdxGEM=; b=d9RwRwjvDiCNnwabcsPndTluercXC+a8UhzCuG2DmaKy96B/YGN/OA11IEwgElf5Wg os8FGwBcyj6J2K6TXQEWOEYDFYlmkrkSBs1bj1jszx3hJvee/JIbG8HaMT5KMN1L7Mww 9H8+UBydkaWYBZBhLr2y78RT5akIfIK5vPcJSyjS32lPTEV74uVzPxVpKDqB21SChmEv roAhKoSj7jsy1dgfuqtwZDf4T8wjdOwNyGfCageNDyJqO9gQxEKsqOZbHm0NjzLKeOlQ IDlo5xiOqgJ17qnniPVK9V/v+0kR/65HrPZ/jXZOHNrIiDbihLxGr/kFfVAXWHz2Txnq I/qw== X-Gm-Message-State: ALoCoQnFxYy8SYdraV44q5JTMdXGedaXb+ZtH+78xuAH29WbJBrpIgt7nAPBibG9dvjyBQ8PHRo1 X-Received: by 10.236.75.201 with SMTP id z49mr5139814yhd.0.1379078115365; Fri, 13 Sep 2013 06:15:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.96.9 with SMTP id do9ls1169238qeb.80.gmail; Fri, 13 Sep 2013 06:15:15 -0700 (PDT) X-Received: by 10.220.88.13 with SMTP id y13mr12196912vcl.20.1379078115134; Fri, 13 Sep 2013 06:15:15 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id c11si3095119vej.128.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:15:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 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.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so934747veb.16 for ; Fri, 13 Sep 2013 06:15:15 -0700 (PDT) X-Received: by 10.220.144.68 with SMTP id y4mr769989vcu.28.1379078115051; Fri, 13 Sep 2013 06:15:15 -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 u4csp80043vcz; Fri, 13 Sep 2013 06:15:14 -0700 (PDT) X-Received: by 10.68.212.106 with SMTP id nj10mr13470265pbc.74.1379078114194; Fri, 13 Sep 2013 06:15:14 -0700 (PDT) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by mx.google.com with ESMTPS id fa1si11141565pab.303.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:15:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.52 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.52; Received: by mail-pb0-f52.google.com with SMTP id wz12so1209215pbc.39 for ; Fri, 13 Sep 2013 06:15:13 -0700 (PDT) X-Received: by 10.68.134.98 with SMTP id pj2mr13428167pbb.110.1379078113806; Fri, 13 Sep 2013 06:15:13 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id go4sm11716188pbb.15.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:15:13 -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 103/228] cpufreq: gx: don't initialize part of policy that is set by core too Date: Fri, 13 Sep 2013 18:30:49 +0530 Message-Id: <54dc020643b2b2a691736003e0284e02b0c22982.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.128.171 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;