From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan 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> References: <1366727607-27444-1-git-send-email-james.hogan@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1366727607-27444-1-git-send-email-james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: James Hogan , Rob Herring , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: devicetree@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