From: Rob Herring Date: Wed, 28 Aug 2013 14:56:40 +0000 (-0500) Subject: mips: use common of_flat_dt_get_machine_name X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=97e7f455434704b4d42f918ac3de76f593e642c1;p=openwrt%2Fstaging%2Fblogic.git mips: use common of_flat_dt_get_machine_name Convert mips to use the common of_flat_dt_get_machine_name function. Signed-off-by: Rob Herring Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Acked-by: John Crispin --- diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c index 0b2485f9a6c1..3c3b0df8f48d 100644 --- a/arch/mips/kernel/prom.c +++ b/arch/mips/kernel/prom.c @@ -47,24 +47,11 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); } -int __init early_init_dt_scan_model(unsigned long node, const char *uname, - int depth, void *data) -{ - if (!depth) { - char *model = of_get_flat_dt_prop(node, "model", NULL); - - if (model) - mips_set_machine_name(model); - } - return 0; -} - void __init __dt_setup_arch(struct boot_param_header *bph) { if (!early_init_dt_scan(bph)) return; - /* try to load the mips machine name */ - of_scan_flat_dt(early_init_dt_scan_model, NULL); + mips_set_machine_name(of_flat_dt_get_machine_name()); } #endif