Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm: Remove unnecessary of_platform_populate with default match table

After patch "of/platform: Add common method to populate default bus",
it is possible for arch code to remove unnecessary callers of
of_platform_populate with default match table.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Lee Jones <lee@kernel.org>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Santosh Shilimkar <ssantosh@kernel.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Viresh Kumar <vireshk@kernel.org>
Cc: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
Cc: Tony Prisk <linux@prisktech.co.nz>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Kefeng Wang and committed by
Rob Herring
850bea23 61c78644

+1 -59
+1 -5
arch/arm/kernel/setup.c
··· 904 904 */ 905 905 if (machine_desc->init_machine) 906 906 machine_desc->init_machine(); 907 - #ifdef CONFIG_OF 908 - else 909 - of_platform_populate(NULL, of_default_bus_match_table, 910 - NULL, NULL); 911 - #endif 907 + 912 908 return 0; 913 909 } 914 910 arch_initcall(customize_machine);
-3
arch/arm/mach-artpec/board-artpec6.c
··· 13 13 #include <linux/irqchip.h> 14 14 #include <linux/irqchip/arm-gic.h> 15 15 #include <linux/mfd/syscon.h> 16 - #include <linux/of_platform.h> 17 16 #include <linux/of.h> 18 17 #include <linux/of_address.h> 19 18 #include <linux/clk-provider.h> ··· 43 44 regmap_write(regmap, ARTPEC6_DMACFG_REGNUM, 44 45 ARTPEC6_DMACFG_UARTS_BURST); 45 46 }; 46 - 47 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 48 47 } 49 48 50 49 static void artpec6_l2c310_write_sec(unsigned long val, unsigned reg)
-2
arch/arm/mach-bcm/board_bcm21664.c
··· 12 12 */ 13 13 14 14 #include <linux/of_address.h> 15 - #include <linux/of_platform.h> 16 15 #include <linux/io.h> 17 16 18 17 #include <asm/mach/arch.h> ··· 59 60 60 61 static void __init bcm21664_init(void) 61 62 { 62 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 63 63 kona_l2_cache_init(); 64 64 } 65 65
-2
arch/arm/mach-bcm/board_bcm281xx.c
··· 13 13 14 14 #include <linux/clocksource.h> 15 15 #include <linux/of_address.h> 16 - #include <linux/of_platform.h> 17 16 18 17 #include <asm/mach/arch.h> 19 18 ··· 57 58 58 59 static void __init bcm281xx_init(void) 59 60 { 60 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 61 61 kona_l2_cache_init(); 62 62 } 63 63
-10
arch/arm/mach-bcm/board_bcm2835.c
··· 15 15 #include <linux/init.h> 16 16 #include <linux/irqchip.h> 17 17 #include <linux/of_address.h> 18 - #include <linux/of_platform.h> 19 18 #include <linux/clk/bcm2835.h> 20 19 21 20 #include <asm/mach/arch.h> ··· 22 23 23 24 static void __init bcm2835_init(void) 24 25 { 25 - int ret; 26 - 27 26 bcm2835_init_clocks(); 28 - 29 - ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, 30 - NULL); 31 - if (ret) { 32 - pr_err("of_platform_populate failed: %d\n", ret); 33 - BUG(); 34 - } 35 27 } 36 28 37 29 static const char * const bcm2835_compat[] = {
-3
arch/arm/mach-exynos/exynos.c
··· 14 14 #include <linux/of.h> 15 15 #include <linux/of_address.h> 16 16 #include <linux/of_fdt.h> 17 - #include <linux/of_platform.h> 18 17 #include <linux/platform_device.h> 19 18 #include <linux/irqchip.h> 20 19 #include <linux/soc/samsung/exynos-regs-pmu.h> ··· 216 217 of_machine_is_compatible("samsung,exynos3250") || 217 218 of_machine_is_compatible("samsung,exynos5250")) 218 219 platform_device_register(&exynos_cpuidle); 219 - 220 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 221 220 } 222 221 223 222 static char const *const exynos_dt_compat[] __initconst = {
-3
arch/arm/mach-highbank/highbank.c
··· 23 23 #include <linux/pl320-ipc.h> 24 24 #include <linux/of.h> 25 25 #include <linux/of_irq.h> 26 - #include <linux/of_platform.h> 27 26 #include <linux/of_address.h> 28 27 #include <linux/reboot.h> 29 28 #include <linux/amba/bus.h> ··· 161 162 bus_register_notifier(&amba_bustype, &highbank_amba_nb); 162 163 163 164 pl320_ipc_register_notifier(&hb_keys_nb); 164 - 165 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 166 165 167 166 if (psci_ops.cpu_suspend) 168 167 platform_device_register(&highbank_cpuidle_device);
-2
arch/arm/mach-imx/mach-imx51.c
··· 52 52 { 53 53 imx51_ipu_mipi_setup(); 54 54 imx_src_init(); 55 - 56 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 57 55 } 58 56 59 57 static void __init imx51_init_late(void)
-2
arch/arm/mach-imx/mach-imx53.c
··· 32 32 { 33 33 imx_src_init(); 34 34 35 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 36 - 37 35 imx_aips_allow_unprivileged_access("fsl,imx53-aipstz"); 38 36 } 39 37
-1
arch/arm/mach-imx/mach-imx6ul.c
··· 64 64 if (parent == NULL) 65 65 pr_warn("failed to initialize soc device\n"); 66 66 67 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 68 67 imx6ul_enet_init(); 69 68 imx_anatop_init(); 70 69 imx6ul_pm_init();
-1
arch/arm/mach-imx/mach-imx7d.c
··· 93 93 if (parent == NULL) 94 94 pr_warn("failed to initialize soc device\n"); 95 95 96 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 97 96 imx_anatop_init(); 98 97 imx7d_enet_init(); 99 98 }
-1
arch/arm/mach-keystone/keystone.c
··· 60 60 bus_register_notifier(&platform_bus_type, &platform_nb); 61 61 } 62 62 keystone_pm_runtime_init(); 63 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 64 63 } 65 64 66 65 static long long __init keystone_pv_fixup(void)
-3
arch/arm/mach-mvebu/board-v7.c
··· 16 16 #include <linux/init.h> 17 17 #include <linux/of_address.h> 18 18 #include <linux/of_fdt.h> 19 - #include <linux/of_platform.h> 20 19 #include <linux/io.h> 21 20 #include <linux/clocksource.h> 22 21 #include <linux/dma-mapping.h> ··· 143 144 { 144 145 if (of_machine_is_compatible("marvell,armadaxp")) 145 146 i2c_quirk(); 146 - 147 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 148 147 } 149 148 150 149 static const char * const armada_370_xp_dt_compat[] __initconst = {
-2
arch/arm/mach-mvebu/dove.c
··· 11 11 #include <linux/init.h> 12 12 #include <linux/mbus.h> 13 13 #include <linux/of.h> 14 - #include <linux/of_platform.h> 15 14 #include <linux/soc/dove/pmu.h> 16 15 #include <asm/hardware/cache-tauros2.h> 17 16 #include <asm/mach/arch.h> ··· 25 26 #endif 26 27 BUG_ON(mvebu_mbus_dt_init(false)); 27 28 dove_init_pmu(); 28 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 29 29 } 30 30 31 31 static const char * const dove_dt_compat[] __initconst = {
-2
arch/arm/mach-picoxcell/common.c
··· 10 10 #include <linux/delay.h> 11 11 #include <linux/of.h> 12 12 #include <linux/of_address.h> 13 - #include <linux/of_platform.h> 14 13 #include <linux/reboot.h> 15 14 16 15 #include <asm/mach/arch.h> ··· 53 54 54 55 static void __init picoxcell_init_machine(void) 55 56 { 56 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 57 57 picoxcell_setup_restart(); 58 58 } 59 59
-1
arch/arm/mach-rockchip/rockchip.c
··· 73 73 static void __init rockchip_dt_init(void) 74 74 { 75 75 rockchip_suspend_init(); 76 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 77 76 } 78 77 79 78 static const char * const rockchip_board_dt_compat[] = {
-2
arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
··· 17 17 18 18 #include <linux/clocksource.h> 19 19 #include <linux/irqchip.h> 20 - #include <linux/of_platform.h> 21 20 #include <linux/serial_s3c.h> 22 21 23 22 #include <asm/mach/arch.h> ··· 34 35 35 36 static void __init s3c2416_dt_machine_init(void) 36 37 { 37 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 38 38 s3c_pm_init(); 39 39 } 40 40
-3
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
··· 8 8 * published by the Free Software Foundation. 9 9 */ 10 10 11 - #include <linux/of_platform.h> 12 - 13 11 #include <asm/mach/arch.h> 14 12 #include <asm/mach/map.h> 15 13 #include <asm/system_misc.h> ··· 46 48 static void __init s3c64xx_dt_init_machine(void) 47 49 { 48 50 samsung_wdt_reset_of_init(); 49 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 50 51 } 51 52 52 53 static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd)
-3
arch/arm/mach-shmobile/setup-r8a7740.c
··· 18 18 #include <linux/io.h> 19 19 #include <linux/irqchip.h> 20 20 #include <linux/irqchip/arm-gic.h> 21 - #include <linux/of_platform.h> 22 21 23 22 #include <asm/mach/map.h> 24 23 #include <asm/mach/arch.h> ··· 76 77 static void __init r8a7740_generic_init(void) 77 78 { 78 79 r8a7740_meram_workaround(); 79 - 80 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 81 80 } 82 81 83 82 static const char *const r8a7740_boards_compat_dt[] __initconst = {
-2
arch/arm/mach-shmobile/setup-sh73a0.c
··· 18 18 #include <linux/init.h> 19 19 #include <linux/interrupt.h> 20 20 #include <linux/irq.h> 21 - #include <linux/of_platform.h> 22 21 #include <linux/delay.h> 23 22 #include <linux/input.h> 24 23 #include <linux/io.h> ··· 54 55 /* Shared attribute override enable, 64K*8way */ 55 56 l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff); 56 57 #endif 57 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 58 58 } 59 59 60 60 static const char *const sh73a0_boards_compat_dt[] __initconst = {
-2
arch/arm/mach-spear/spear1310.c
··· 14 14 #define pr_fmt(fmt) "SPEAr1310: " fmt 15 15 16 16 #include <linux/amba/pl022.h> 17 - #include <linux/of_platform.h> 18 17 #include <linux/pata_arasan_cf_data.h> 19 18 #include <asm/mach/arch.h> 20 19 #include <asm/mach/map.h> ··· 26 27 27 28 static void __init spear1310_dt_init(void) 28 29 { 29 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 30 30 platform_device_register_simple("spear-cpufreq", -1, NULL, 0); 31 31 } 32 32
-1
arch/arm/mach-spear/spear1340.c
··· 19 19 20 20 static void __init spear1340_dt_init(void) 21 21 { 22 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 23 22 platform_device_register_simple("spear-cpufreq", -1, NULL, 0); 24 23 } 25 24
-3
arch/arm/mach-vt8500/vt8500.c
··· 30 30 #include <linux/of.h> 31 31 #include <linux/of_address.h> 32 32 #include <linux/of_irq.h> 33 - #include <linux/of_platform.h> 34 33 35 34 #define LEGACY_GPIO_BASE 0xD8110000 36 35 #define LEGACY_PMC_BASE 0xD8130000 ··· 157 158 pm_power_off = &vt8500_power_off; 158 159 else 159 160 pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__); 160 - 161 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 162 161 } 163 162 164 163 static const char * const vt8500_dt_compat[] = {