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: 2891281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B3FE49F1C0 for ; Fri, 13 Sep 2013 17:03:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9947C202B9 for ; Fri, 13 Sep 2013 17:03:28 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0166920316 for ; Fri, 13 Sep 2013 17:03:27 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTMn-0000su-JN; Fri, 13 Sep 2013 13:24:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTM9-0008IR-83; Fri, 13 Sep 2013 13:24:17 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTDj-00070m-QA for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2013 13:15:36 +0000 Received: by mail-pa0-f46.google.com with SMTP id fa1so2510065pad.5 for ; Fri, 13 Sep 2013 06:15:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=lNJRK3nwTTLQF4VhN4To9/yfO0XIYZOrEXDO+OdxGEM=; b=E2jHUQYuH3c5MK+iCKuPV2BrI0mZmwGK/+AYXDX1HOnB7tvt95rbTYiy+6IguNy4Xm olFcYgE9gM5BD4PqIMouczq6zL3/plfrb7tTbn2E6Ose4SBlTlD4jb3+yt2gnYIGiDRJ Ntsanjfb5GcGRowF8kOlS9i0EbACPnKl1scsSISxARYVUU+xlRJA/VdpZi3sNnwGQiWT cL52vOmV4a8V2u+ywf83gCG/rR9UK0qbelVxHT5XMAFqPCGreLE5w7FuOTnzwjGs0A2G HAK+ybynk8DHEKuKwkAE+Wzs2f0J+xe/3bEF5g+vuUYkxRId/P7bGiUX8HrfqVZ1+q5V Mwig== X-Gm-Message-State: ALoCoQkg/bfjjHIsMcfgyVmugtNqiUvyF9oJDIsKdo1NkUNXHeLSlX2pdpR8p9Flgyxc37ZytYF5 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130913_091535_975999_62BA9A38 X-CRM114-Status: GOOD ( 12.23 ) X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;