Skip to content

Commit cd04d58

Browse files
seehearfeeltsbogend
authored andcommitted
MIPS: Remove redundant definitions of device_tree_init()
There exists many same definitions of device_tree_init() for various platforms, add a weak function in arch/mips/kernel/prom.c to clean up the related code. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 89fa126 commit cd04d58

File tree

8 files changed

+5
-41
lines changed

8 files changed

+5
-41
lines changed

arch/mips/ath79/setup.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,3 @@ void __init arch_init_irq(void)
269269
{
270270
irqchip_init();
271271
}
272-
273-
void __init device_tree_init(void)
274-
{
275-
unflatten_and_copy_device_tree();
276-
}

arch/mips/kernel/prom.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,9 @@ int __init __dt_register_buses(const char *bus0, const char *bus1)
6464
return 0;
6565
}
6666

67+
void __weak __init device_tree_init(void)
68+
{
69+
unflatten_and_copy_device_tree();
70+
}
71+
6772
#endif

arch/mips/lantiq/prom.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ void __init plat_mem_setup(void)
8484
__dt_setup_arch(dtb);
8585
}
8686

87-
void __init device_tree_init(void)
88-
{
89-
unflatten_and_copy_device_tree();
90-
}
91-
9287
void __init prom_init(void)
9388
{
9489
/* call the soc specific detetcion code and get it to fill soc_info */

arch/mips/loongson64/setup.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,3 @@ void __init plat_mem_setup(void)
3636
if (loongson_fdt_blob)
3737
__dt_setup_arch(loongson_fdt_blob);
3838
}
39-
40-
void __init device_tree_init(void)
41-
{
42-
unflatten_and_copy_device_tree();
43-
}

arch/mips/mti-malta/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Copyright (C) 2008 Wind River Systems, Inc.
77
# written by Ralf Baechle <ralf@linux-mips.org>
88
#
9-
obj-y += malta-dt.o
109
obj-y += malta-dtshim.o
1110
obj-y += malta-init.o
1211
obj-y += malta-int.o

arch/mips/mti-malta/malta-dt.c

Lines changed: 0 additions & 15 deletions
This file was deleted.

arch/mips/pic32/pic32mzda/init.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ void __init prom_init(void)
7878
pic32_init_cmdline((int)fw_arg0, (char **)fw_arg1);
7979
}
8080

81-
void __init device_tree_init(void)
82-
{
83-
unflatten_and_copy_device_tree();
84-
}
85-
8681
static struct pic32_sdhci_platform_data sdhci_data = {
8782
.setup_dma = pic32_set_sdhci_adma_fifo_threshold,
8883
};

arch/mips/ralink/of.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ __iomem void *plat_of_remap_node(const char *node)
4848
return ioremap(res.start, resource_size(&res));
4949
}
5050

51-
void __init device_tree_init(void)
52-
{
53-
unflatten_and_copy_device_tree();
54-
}
55-
5651
void __init plat_mem_setup(void)
5752
{
5853
void *dtb;

0 commit comments

Comments
 (0)