From patchwork Wed Jul 18 14:34:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 10532631 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0FCE96020A for ; Wed, 18 Jul 2018 14:34:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 022BA295B7 for ; Wed, 18 Jul 2018 14:34:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA3FC295D0; Wed, 18 Jul 2018 14:34:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED914295B7 for ; Wed, 18 Jul 2018 14:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730432AbeGRPM4 (ORCPT ); Wed, 18 Jul 2018 11:12:56 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:8216 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730361AbeGRPM4 (ORCPT ); Wed, 18 Jul 2018 11:12:56 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie2.idc.renesas.com with ESMTP; 18 Jul 2018 23:34:42 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 9BB6C790AC; Wed, 18 Jul 2018 23:34:42 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.51,370,1526310000"; d="scan'208";a="285716424" Received: from unknown (HELO vbox.ree.adwin.renesas.com) ([10.226.37.67]) by relmlii1.idc.renesas.com with ESMTP; 18 Jul 2018 23:34:42 +0900 From: Phil Edworthy To: Geert Uytterhoeven Cc: Simon Horman , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Phil Edworthy Subject: [PATCH] clk: renesas: r9a06g032: Avoid needless probe deferring Date: Wed, 18 Jul 2018 15:34:36 +0100 Message-Id: <1531924476-23261-1-git-send-email-phil.edworthy@renesas.com> X-Mailer: git-send-email 2.7.4 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid all SoC peripheral drivers deferring their probes, both clock and pinctrl drivers should already be probed. Since the pinctrl driver requires a clock to access the registers, the clock driver should be probed before the pinctrl driver. Therefore, move the clock driver from subsys_initcall to core_initcall. Signed-off-by: Phil Edworthy --- drivers/clk/renesas/r9a06g032-clocks.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c index a0b6ecd..b03d616 100644 --- a/drivers/clk/renesas/r9a06g032-clocks.c +++ b/drivers/clk/renesas/r9a06g032-clocks.c @@ -877,17 +877,18 @@ static const struct of_device_id r9a06g032_match[] = { { } }; -static struct platform_driver r9a06g032_clock_driver = { +static struct platform_driver r9a06g032_clock_driver __refdata = { .driver = { .name = "renesas,r9a06g032-sysctrl", .of_match_table = r9a06g032_match, }, + .probe = r9a06g032_clocks_probe, }; static int __init r9a06g032_clocks_init(void) { - return platform_driver_probe(&r9a06g032_clock_driver, - r9a06g032_clocks_probe); + platform_driver_register(&r9a06g032_clock_driver); + return 0; } -subsys_initcall(r9a06g032_clocks_init); +core_initcall(r9a06g032_clocks_init);