From patchwork Thu Oct 3 14:58:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2983751 Return-Path: X-Original-To: patchwork-linux-pm@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 CD68B9F288 for ; Thu, 3 Oct 2013 15:06:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 34BC32017E for ; Thu, 3 Oct 2013 15:06:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B37020206 for ; Thu, 3 Oct 2013 15:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754593Ab3JCPGN (ORCPT ); Thu, 3 Oct 2013 11:06:13 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:45489 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754376Ab3JCPGM (ORCPT ); Thu, 3 Oct 2013 11:06:12 -0400 Received: by mail-pa0-f42.google.com with SMTP id lj1so2772224pab.1 for ; Thu, 03 Oct 2013 08:06:12 -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=OYXSiVr45ifu1tbWSCpPUwFXKEeF6TId8NuiOW3ld2s=; b=dJ6GK8rI+vtIfcmDziyatktXAN1WPPb75hw5Did5r5R2QZk8FC2pD3AlLKY1JohU65 lY+/Hg1Qq1RRM341hYE5RKI7EACUdJOa5qG9JCErVm42f76tvvAc26/AkhFLhHYYWKFS t+apq8T1WTtu/sHs5lkTu5eB5g7qcBPmpDW31YA+iHoF5RDwjDIOqUNopeFUTYOjiKJ9 aDHGZyi+Un10LcDNUBIRzfUHs1RQTesOrhvkly1FRWy9Zf7XdZFbCNOoshZwHZmZVhvt IvJLKluWQPW+fpeldQCy3b8Rn6E6hGi7BDbC6nj5gq4iaQWuD1hc6jsjL65UOf0HkSZn n8zA== X-Gm-Message-State: ALoCoQlE1+gh3eLxBN2ySuz1ANVY1MAdx8ZaZcXSRVLTa6h0OBrR5xPZXAJ/Y7XwRnH0Or0wuS54 X-Received: by 10.68.196.138 with SMTP id im10mr999049pbc.127.1380812771901; Thu, 03 Oct 2013 08:06:11 -0700 (PDT) Received: from localhost ([122.167.152.64]) by mx.google.com with ESMTPSA id sy10sm11263070pac.15.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:06:11 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar , Eric Miao Subject: [PATCH V2 Resend 63/92] cpufreq: pxa: don't initialize part of policy that is set by core too Date: Thu, 3 Oct 2013 20:28:57 +0530 Message-Id: <48f83e6db5013a0b4a021075c9f603886772957a.1380783079.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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(). Cc: Eric Miao Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 2 -- drivers/cpufreq/pxa3xx-cpufreq.c | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 82905fe..29aca57 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -397,8 +397,6 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) /* set default policy and cpuinfo */ policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ - policy->cur = get_clk_frequency_khz(0); /* current freq */ - policy->min = policy->max = policy->cur; /* Generate pxa25x the run cpufreq_frequency_table struct */ for (i = 0; i < NUM_PXA25x_RUN_FREQS; i++) { diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index ae3ac08..47fbee4 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -201,11 +201,10 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy) int ret = -EINVAL; /* set default policy and cpuinfo */ - policy->cpuinfo.min_freq = 104000; - policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000; + policy->min = policy->cpuinfo.min_freq = 104000; + policy->max = policy->cpuinfo.max_freq = + (cpu_is_pxa320()) ? 806000 : 624000; policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ - policy->max = pxa3xx_get_clk_frequency_khz(0); - policy->cur = policy->min = policy->max; if (cpu_is_pxa300() || cpu_is_pxa310()) ret = setup_freqs_table(policy, pxa300_freqs,