arm: use of_platform_default_populate() to populate
authorKefeng Wang <wangkefeng.wang@huawei.com>
Wed, 1 Jun 2016 06:53:05 +0000 (14:53 +0800)
committerRob Herring <robh@kernel.org>
Thu, 23 Jun 2016 20:00:39 +0000 (15:00 -0500)
Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Viresh Kumar <vireshk@kernel.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
22 files changed:
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91sam9.c
arch/arm/mach-at91/sama5.c
arch/arm/mach-cns3xxx/core.c
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-imx/mach-imx6sl.c
arch/arm/mach-imx/mach-imx6sx.c
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-lpc32xx/phy3250.c
arch/arm/mach-mvebu/kirkwood.c
arch/arm/mach-mxs/mach-mxs.c
arch/arm/mach-nspire/nspire.c
arch/arm/mach-orion5x/board-dt.c
arch/arm/mach-spear/spear300.c
arch/arm/mach-spear/spear310.c
arch/arm/mach-spear/spear320.c
arch/arm/mach-spear/spear6xx.c
arch/arm/mach-tegra/tegra.c
arch/arm/mach-u300/core.c
arch/arm/mach-versatile/versatile_dt.c
arch/arm/mach-zynq/common.c

index 63b4fa25b48a814f1d40caeeb3be8ad9868d0d10..d068ec3cd1f6dbaf7c2e9ff99ac5e22f82fb6e81 100644 (file)
@@ -30,7 +30,7 @@ static void __init at91rm9200_dt_device_init(void)
        if (soc != NULL)
                soc_dev = soc_device_to_device(soc);
 
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
+       of_platform_default_populate(NULL, NULL, soc_dev);
 
        at91rm9200_pm_init();
 }
index cada2a6412b3ba696e36a70b29568153770deea3..ba28e9cc584d9a336eb5561599525d32cfc075fe 100644 (file)
@@ -61,7 +61,7 @@ static void __init at91sam9_common_init(void)
        if (soc != NULL)
                soc_dev = soc_device_to_device(soc);
 
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
+       of_platform_default_populate(NULL, NULL, soc_dev);
 }
 
 static void __init at91sam9_dt_device_init(void)
index 922b85f07cd273d35daab8e3ff52b74f751f571d..b272c45b400fe70df69ab46e799fd7dca60efc8b 100644 (file)
@@ -68,7 +68,7 @@ static void __init sama5_dt_device_init(void)
        if (soc != NULL)
                soc_dev = soc_device_to_device(soc);
 
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
+       of_platform_default_populate(NULL, NULL, soc_dev);
        sama5_pm_init();
 }
 
index 9b1dc223d8d3b3bc9ea749bacfdd5c24aba78aa1..03da3813f1ab631a0f97be7a1d893176820f9b29 100644 (file)
@@ -395,8 +395,7 @@ static void __init cns3xxx_init(void)
 
        pm_power_off = cns3xxx_power_off;
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                        cns3xxx_auxdata, NULL);
+       of_platform_default_populate(NULL, cns3xxx_auxdata, NULL);
 }
 
 static const char *const cns3xxx_dt_compat[] __initconst = {
index cb27d566d5abab3865fd6e0689832c933b6a8993..e3940707eeb8b8662d83412a80939af7dbd048ff 100644 (file)
@@ -278,7 +278,7 @@ static void __init imx6q_init_machine(void)
 
        imx6q_enet_phy_init();
 
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
+       of_platform_default_populate(NULL, NULL, parent);
 
        imx_anatop_init();
        cpu_is_imx6q() ?  imx6q_pm_init() : imx6dl_pm_init();
index 300326373166bc85c84470b6939ba0180fef1358..37ae87d6e0e908f95e4191a68ea0d8b901983bce 100644 (file)
@@ -52,7 +52,7 @@ static void __init imx6sl_init_machine(void)
        if (parent == NULL)
                pr_warn("failed to initialize soc device\n");
 
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
+       of_platform_default_populate(NULL, NULL, parent);
 
        imx6sl_fec_init();
        imx_anatop_init();
index 6a0b0614de293b197742c613587d3fd0593ccae1..107cfc15282be8f941caf86b3773f32ca6a948b0 100644 (file)
@@ -72,7 +72,7 @@ static void __init imx6sx_init_machine(void)
        if (parent == NULL)
                pr_warn("failed to initialize soc device\n");
 
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
+       of_platform_default_populate(NULL, NULL, parent);
 
        imx6sx_enet_init();
        imx_anatop_init();
index 2b118f20c62c6b9c86cd8b290307a4ab080be4da..c7bb83205f5b3363a63506c649e1434835d98750 100644 (file)
@@ -240,8 +240,7 @@ static void __init ap_init_of(void)
        if (!ebi_base)
                return;
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       ap_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, ap_auxdata_lookup, NULL);
 
        sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET);
        for (i = 0; i < 4; i++) {
index 6f6b051e81e0f74262eec601c6abf4b55203f8c4..825298349bf57d33f821c3956633d795eca34cd6 100644 (file)
@@ -231,8 +231,7 @@ static void __init intcp_init_of(void)
        if (!intcp_con_base)
                return;
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                            intcp_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, intcp_auxdata_lookup, NULL);
 }
 
 static const char * intcp_dt_board_compat[] = {
index 81265e80302d12082ba0e5d3a41f39eb73fa8b4d..0e4cbbe980eb9a600adb7cac3ba39ad79491d572 100644 (file)
@@ -191,8 +191,7 @@ static void __init lpc3250_machine_init(void)
                LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN,
                LPC32XX_CLKPWR_TEST_CLK_SEL);
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                            lpc32xx_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, lpc32xx_auxdata_lookup, NULL);
 }
 
 static const char *const lpc32xx_dt_compat[] __initconst = {
index f9d8e1ea7183a510cb3920056d990407d3ffb0ac..8f459ee34e6f4790b13c4eca67f4e37b0ea4472b 100644 (file)
@@ -179,7 +179,7 @@ static void __init kirkwood_dt_init(void)
        kirkwood_pm_init();
        kirkwood_dt_eth_fixup();
 
-       of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL);
+       of_platform_default_populate(NULL, auxdata, NULL);
 }
 
 static const char * const kirkwood_dt_board_compat[] __initconst = {
index f1ea4700efcfbc5a4db767abedd0cefc0768d2a5..0b7fe74ff46de9caf27dd558f360e856e1c131ab 100644 (file)
@@ -498,8 +498,7 @@ static void __init mxs_machine_init(void)
        else if (of_machine_is_compatible("msr,m28cu3"))
                m28cu3_init();
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                            NULL, parent);
+       of_platform_default_populate(NULL, NULL, parent);
 
        mxs_restart_init();
 
index 34c2a1b32e7da24854abe73f95f7f57d44b4ada8..f0808fcc5accad2ec314651974bdea864704e536 100644 (file)
@@ -57,8 +57,7 @@ static struct of_dev_auxdata nspire_auxdata[] __initdata = {
 
 static void __init nspire_init(void)
 {
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       nspire_auxdata, NULL);
+       of_platform_default_populate(NULL, nspire_auxdata, NULL);
 }
 
 static void nspire_restart(enum reboot_mode mode, const char *cmd)
index 6f4c2c4ae2a527f7ee655fbfb6d8ce4481234560..3d36f1d951964667b111ebe5f75bcad5465d775e 100644 (file)
@@ -63,8 +63,7 @@ static void __init orion5x_dt_init(void)
        if (of_machine_is_compatible("maxtor,shared-storage-2"))
                mss2_init();
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                            orion5x_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
 }
 
 static const char *orion5x_dt_compat[] = {
index 5b32edda22769b7f3b76fe5bc16143b3917666aa..325b89579be105b4abe626f5b9086c727fd3d950 100644 (file)
@@ -194,8 +194,7 @@ static void __init spear300_dt_init(void)
        pl080_plat_data.slave_channels = spear300_dma_info;
        pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear300_dma_info);
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       spear300_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, spear300_auxdata_lookup, NULL);
 }
 
 static const char * const spear300_dt_board_compat[] = {
index 86a44ac7ff67b6b404d69a11172a3a8b21f8be24..59e173dc85cf317e5fd39ccde6f79826b4e96515 100644 (file)
@@ -236,8 +236,7 @@ static void __init spear310_dt_init(void)
        pl080_plat_data.slave_channels = spear310_dma_info;
        pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear310_dma_info);
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       spear310_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, spear310_auxdata_lookup, NULL);
 }
 
 static const char * const spear310_dt_board_compat[] = {
index d45d751926c50e344cf168002eecb185eb82a511..0958f68a21e236566666f13247eb1b5f8555bba2 100644 (file)
@@ -240,8 +240,7 @@ static void __init spear320_dt_init(void)
        pl080_plat_data.slave_channels = spear320_dma_info;
        pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear320_dma_info);
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       spear320_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, spear320_auxdata_lookup, NULL);
 }
 
 static const char * const spear320_dt_board_compat[] = {
index da26fa5b68d76332d3d60574952b29d50123aedc..ccf3573b831c47be90a207f8190aeb2bd85363d7 100644 (file)
@@ -411,8 +411,7 @@ struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = {
 
 static void __init spear600_dt_init(void)
 {
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       spear6xx_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, spear6xx_auxdata_lookup, NULL);
 }
 
 static const char *spear600_dt_board_compat[] = {
index 2378fa560a210b4a523d60a230b1b6ca128a42ce..6745a657d261c6a2cda6a55b35ff7953b0bc2c2e 100644 (file)
@@ -115,7 +115,7 @@ static void __init tegra_dt_init(void)
         * devices
         */
 out:
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
+       of_platform_default_populate(NULL, NULL, parent);
 }
 
 static void __init paz00_init(void)
index 546338bbacf8670b30b483c1c69737bc5813a723..a4910ea6811a4538afef32f9192069b77a7164a9 100644 (file)
@@ -391,8 +391,7 @@ static void __init u300_init_machine_dt(void)
        pinctrl_register_mappings(u300_pinmux_map,
                                  ARRAY_SIZE(u300_pinmux_map));
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       u300_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, u300_auxdata_lookup, NULL);
 
        /* Enable SEMI self refresh */
        val = readw(syscon_base + U300_SYSCON_SMCR) |
index d643b9210dbd527854791428b459c710e89f8cf1..3c8d39c129094d3dbf3bbe26dac09e144c526ae0 100644 (file)
@@ -344,8 +344,7 @@ static void __init versatile_dt_init(void)
 
        versatile_dt_pci_init();
 
-       of_platform_populate(NULL, of_default_bus_match_table,
-                            versatile_auxdata_lookup, NULL);
+       of_platform_default_populate(NULL, versatile_auxdata_lookup, NULL);
 }
 
 static const char *const versatile_dt_match[] __initconst = {
index da876d28ccbc53c1e82f042bcf5f5e730ed2b976..d12002cd63bc6f6b27fc4f55c2076c0c23481807 100644 (file)
@@ -141,7 +141,7 @@ out:
         * Finished with the static registrations now; fill in the missing
         * devices
         */
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
+       of_platform_default_populate(NULL, NULL, parent);
 
        platform_device_register(&zynq_cpuidle_device);
 }