From patchwork Thu May 9 05:18:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 2543031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id DE91FDF24C for ; Thu, 9 May 2013 05:19:30 +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 1UaJGD-0001In-UF; Thu, 09 May 2013 05:19:22 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UaJGB-0007MZ-7g; Thu, 09 May 2013 05:19:19 +0000 Received: from wolverine01.qualcomm.com ([199.106.114.254]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UaJG7-0007LM-CK for linux-arm-kernel@lists.infradead.org; Thu, 09 May 2013 05:19:16 +0000 X-IronPort-AV: E=Sophos;i="4.87,638,1363158000"; d="scan'208";a="45486332" Received: from pdmz-ns-snip_115_219.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.115.219]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 May 2013 22:18:52 -0700 Received: from skannan1-linux.qualcomm.com (pdmz-ns-snip_218_1.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id 5154710004C7; Wed, 8 May 2013 22:18:52 -0700 (PDT) From: Saravana Kannan To: Greg Kroah-Hartman , Grant Likely , Mike Turquette , Liam Girdwood , Mark Brown Subject: [PATCH 2/3] clk: Disable unused clocks after deferred probing is done Date: Wed, 8 May 2013 22:18:45 -0700 Message-Id: <1368076726-11492-3-git-send-email-skannan@codeaurora.org> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1368076726-11492-1-git-send-email-skannan@codeaurora.org> References: <1368076726-11492-1-git-send-email-skannan@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130509_011915_608661_3F5E5C13 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [199.106.114.254 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-msm@vger.kernel.org, Stephen Boyd , linux-kernel@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 With deferred probing, late_initcall() is too soon to declare a clock as unused. Wait for deferred probing to finish before declaring a clock as unused. Signed-off-by: Saravana Kannan --- drivers/clk/clk.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index fe4055f..35de83b 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -516,6 +516,8 @@ static int clk_disable_unused(void) return 0; } + wait_for_init_deferred_probe_done(); + clk_prepare_lock(); hlist_for_each_entry(clk, &clk_root_list, child_node) @@ -534,7 +536,7 @@ static int clk_disable_unused(void) return 0; } -late_initcall(clk_disable_unused); +late_initcall_sync(clk_disable_unused); /*** helper functions ***/