From patchwork Thu Oct 3 14:59:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2983841 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 8D20D9F288 for ; Thu, 3 Oct 2013 15:07:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4E3C20207 for ; Thu, 3 Oct 2013 15:07:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 393CE20274 for ; Thu, 3 Oct 2013 15:07:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754107Ab3JCPG7 (ORCPT ); Thu, 3 Oct 2013 11:06:59 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:45487 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754326Ab3JCPG6 (ORCPT ); Thu, 3 Oct 2013 11:06:58 -0400 Received: by mail-pd0-f178.google.com with SMTP id w10so2597349pde.37 for ; Thu, 03 Oct 2013 08:06:58 -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=3SFTcudW+oIBQ+RKNroxel34f5ItCUIOz+O7wE7Jimg=; b=Rct7f25Zs/6Eby+PJ/6Y/Is2dyhmxEbgapotX9s6oklWn2gqMRP5xU6XDF4ibU9IYR 679Q6OKcmJVmrVxXUU+Qp2IL/5R7YrzAAcSB2uP4NvgQQHLA2MCFfYAR5KpdqjoxPS+z NWI8ruBPVrM2Vt4k8MgQmnO7rCXhirybS1XfAGgYs5fPQNOU2T4qBe5ww55puztXWDuT lXyeLEbodl8JMx1ilBe8a69BWsf8uC5Oy1yyjpOrZWkeNhW8XHGmrkLdhS0XVmM51d9e wnz9j0xxWpbouXKq0012knOTrcowHB2xUWSw4Vm8AROCUkW3tE2BNVld3uVEisRCKixL RKNg== X-Gm-Message-State: ALoCoQnsYDk9mOfBJwJdkxKWDwKLyTGhJUK4/HCWJOMB4VOq2MQ6YTyUFwoYErvp8k4SsuFsrosN X-Received: by 10.68.178.197 with SMTP id da5mr9176451pbc.28.1380812818467; Thu, 03 Oct 2013 08:06:58 -0700 (PDT) Received: from localhost ([122.167.152.64]) by mx.google.com with ESMTPSA id ye1sm11256961pab.19.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:06:57 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar , Stephen Warren Subject: [PATCH V2 Resend 71/92] cpufreq: tegra: don't initialize part of policy that is set by core too Date: Thu, 3 Oct 2013 20:29:05 +0530 Message-Id: <1e5ed605e56b1c7f57203c69ff2b0554e9e0584e.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: Stephen Warren Signed-off-by: Viresh Kumar --- drivers/cpufreq/tegra-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c index c36a8e7..9c32b23 100644 --- a/drivers/cpufreq/tegra-cpufreq.c +++ b/drivers/cpufreq/tegra-cpufreq.c @@ -211,8 +211,7 @@ static int tegra_cpu_init(struct cpufreq_policy *policy) clk_prepare_enable(cpu_clk); cpufreq_table_validate_and_show(policy, freq_table); - policy->cur = tegra_getspeed(policy->cpu); - target_cpu_speed[policy->cpu] = policy->cur; + target_cpu_speed[policy->cpu] = tegra_getspeed(policy->cpu); /* FIXME: what's the actual transition time? */ policy->cpuinfo.transition_latency = 300 * 1000;