From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756014Ab3DWOeb (ORCPT ); Tue, 23 Apr 2013 10:34:31 -0400 Received: from multi.imgtec.com ([194.200.65.239]:40821 "EHLO multi.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754898Ab3DWOea (ORCPT ); Tue, 23 Apr 2013 10:34:30 -0400 From: James Hogan To: CC: Grant Likely , Rob Herring , Linus Walleij , , James Hogan , Arnd Bergmann Subject: [PATCH 1/8] metag: of_platform_populate from arch generic code Date: Tue, 23 Apr 2013 15:33:20 +0100 Message-ID: <1366727607-27444-2-git-send-email-james.hogan@imgtec.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1366727607-27444-1-git-send-email-james.hogan@imgtec.com> References: <1366727607-27444-1-git-send-email-james.hogan@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-SEF-Processed: 7_3_0_01181__2013_04_23_15_34_27 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If no init_machine callback is provided, call of_platform_populate() instead. This allows a board/SoC that only needs to call of_platform_populate to omit the callback altogether. Signed-off-by: James Hogan Cc: Grant Likely Cc: Rob Herring Cc: Arnd Bergmann --- arch/metag/kernel/setup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/metag/kernel/setup.c b/arch/metag/kernel/setup.c index 4f5726f..e18cebb 100644 --- a/arch/metag/kernel/setup.c +++ b/arch/metag/kernel/setup.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -424,6 +425,9 @@ static int __init customize_machine(void) /* customizes platform devices, or adds new ones */ if (machine_desc->init_machine) machine_desc->init_machine(); + else + of_platform_populate(NULL, of_default_bus_match_table, NULL, + NULL); return 0; } arch_initcall(customize_machine); -- 1.8.1.2