From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Holler Subject: [RFC PATCH 7/9] dt: deps: kirkwood: make it possible to use CONFIG_OF_DEPENDENCIES Date: Mon, 12 May 2014 18:47:58 +0200 Message-ID: <1399913280-6915-8-git-send-email-holler@ahsoftware.de> References: <1399913280-6915-1-git-send-email-holler@ahsoftware.de> Return-path: In-Reply-To: <1399913280-6915-1-git-send-email-holler@ahsoftware.de> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Russell King , Jon Loeliger , Grant Likely , Rob Herring , Alexander Holler List-Id: devicetree@vger.kernel.org Use the feature of dependency based initialization order for drivers if CONFIG_OF_DEPENDENCIES is enabled. Signed-off-by: Alexander Holler --- arch/arm/mach-kirkwood/board-dt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 7818815..5c352b7 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -133,7 +134,14 @@ static void __init kirkwood_dt_init(void) if (of_machine_is_compatible("marvell,mv88f6281gtw-ge")) mv88f6281gtw_ge_init(); +#ifdef CONFIG_OF_DEPENDENCIES + if (!of_init_build_order(NULL, NULL)) + of_init_create_devices(NULL, NULL); + else + of_init_free_order(); +#else of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +#endif } static const char * const kirkwood_dt_board_compat[] = { -- 1.8.3.1