All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35 ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Then it is possible for driver code build as a module, and no
need to export of_default_bus_match_table anymore.

This patchset is based on Linux 4.5.

Changes since v1:
- Add ack, test and review
- Remove v1 patch 14/15, the similar patch has posted and applied,
  see https://patchwork.kernel.org/patch/8096991/

v1:
- https://lkml.org/lkml/2016/1/26/1123

Kefeng Wang (14):
  arm: use of_platform_default_populate() to populate default bus
  arm64: use of_platform_default_populate() to populate default bus
  mips: use of_platform_default_populate() to populate default bus
  arc: use of_platform_default_populate() to populate default bus
  c6x: use of_platform_default_populate() to populate default bus
  metag: use of_platform_default_populate() to populate default bus
  cris: use of_platform_default_populate() to populate default bus
  nios2: use of_platform_default_populate() to populate default bus
  xtensa: use of_platform_default_populate() to populate default bus
  bus: imx-weim: use of_platform_default_populate() to populate default
    bus
  bus: uniphier-system-bus: use of_platform_default_populate() to
    populate default bus
  memory: omap-gpmc: use of_platform_default_populate() to populate
    default bus
  of: unittest: use of_platform_default_populate() to populate default
    bus
  Revert "of/platform: export of_default_bus_match_table"

 arch/arc/kernel/setup.c                  | 2 +-
 arch/arm/kernel/setup.c                  | 3 +--
 arch/arm/mach-at91/at91rm9200.c          | 2 +-
 arch/arm/mach-at91/at91sam9.c            | 2 +-
 arch/arm/mach-at91/sama5.c               | 2 +-
 arch/arm/mach-bcm/board_bcm21664.c       | 2 +-
 arch/arm/mach-bcm/board_bcm281xx.c       | 2 +-
 arch/arm/mach-bcm/board_bcm2835.c        | 5 ++---
 arch/arm/mach-cns3xxx/core.c             | 3 +--
 arch/arm/mach-davinci/da8xx-dt.c         | 3 +--
 arch/arm/mach-exynos/exynos.c            | 2 +-
 arch/arm/mach-highbank/highbank.c        | 2 +-
 arch/arm/mach-imx/imx27-dt.c             | 2 +-
 arch/arm/mach-imx/mach-imx51.c           | 2 +-
 arch/arm/mach-imx/mach-imx53.c           | 2 +-
 arch/arm/mach-imx/mach-imx6q.c           | 2 +-
 arch/arm/mach-imx/mach-imx6sl.c          | 2 +-
 arch/arm/mach-imx/mach-imx6sx.c          | 2 +-
 arch/arm/mach-imx/mach-imx6ul.c          | 2 +-
 arch/arm/mach-imx/mach-imx7d.c           | 2 +-
 arch/arm/mach-integrator/integrator_ap.c | 3 +--
 arch/arm/mach-integrator/integrator_cp.c | 3 +--
 arch/arm/mach-keystone/keystone.c        | 2 +-
 arch/arm/mach-lpc32xx/phy3250.c          | 3 +--
 arch/arm/mach-mvebu/board-v7.c           | 2 +-
 arch/arm/mach-mvebu/dove.c               | 2 +-
 arch/arm/mach-mvebu/kirkwood.c           | 2 +-
 arch/arm/mach-mxs/mach-mxs.c             | 3 +--
 arch/arm/mach-nspire/nspire.c            | 3 +--
 arch/arm/mach-orion5x/board-dt.c         | 3 +--
 arch/arm/mach-picoxcell/common.c         | 2 +-
 arch/arm/mach-pxa/pxa-dt.c               | 3 +--
 arch/arm/mach-rockchip/rockchip.c        | 2 +-
 arch/arm/mach-s3c24xx/mach-s3c2416-dt.c  | 2 +-
 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c  | 2 +-
 arch/arm/mach-shmobile/setup-r8a7740.c   | 2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c    | 2 +-
 arch/arm/mach-spear/spear1310.c          | 2 +-
 arch/arm/mach-spear/spear1340.c          | 2 +-
 arch/arm/mach-spear/spear300.c           | 3 +--
 arch/arm/mach-spear/spear310.c           | 3 +--
 arch/arm/mach-spear/spear320.c           | 3 +--
 arch/arm/mach-spear/spear6xx.c           | 3 +--
 arch/arm/mach-tegra/tegra.c              | 2 +-
 arch/arm/mach-u300/core.c                | 3 +--
 arch/arm/mach-versatile/versatile_dt.c   | 3 +--
 arch/arm/mach-vt8500/vt8500.c            | 2 +-
 arch/arm/mach-zynq/common.c              | 2 +-
 arch/arm64/kernel/setup.c                | 3 +--
 arch/c6x/platforms/platform.c            | 2 +-
 arch/cris/kernel/setup.c                 | 2 +-
 arch/metag/kernel/setup.c                | 3 +--
 arch/mips/ath79/setup.c                  | 2 +-
 arch/mips/jz4740/setup.c                 | 2 +-
 arch/mips/mti-sead3/sead3-setup.c        | 2 +-
 arch/mips/pic32/pic32mzda/init.c         | 3 +--
 arch/mips/pistachio/init.c               | 2 +-
 arch/mips/xilfpga/init.c                 | 2 +-
 arch/nios2/platform/platform.c           | 3 +--
 arch/xtensa/kernel/setup.c               | 2 +-
 drivers/bus/imx-weim.c                   | 5 ++---
 drivers/bus/uniphier-system-bus.c        | 3 +--
 drivers/memory/omap-gpmc.c               | 3 +--
 drivers/of/platform.c                    | 1 -
 drivers/of/unittest.c                    | 5 ++---
 65 files changed, 67 insertions(+), 93 deletions(-)

-- 
2.6.0.GIT

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35 ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Then it is possible for driver code build as a module, and no
need to export of_default_bus_match_table anymore.

This patchset is based on Linux 4.5.

Changes since v1:
- Add ack, test and review
- Remove v1 patch 14/15, the similar patch has posted and applied,
  see https://patchwork.kernel.org/patch/8096991/

v1:
- https://lkml.org/lkml/2016/1/26/1123

Kefeng Wang (14):
  arm: use of_platform_default_populate() to populate default bus
  arm64: use of_platform_default_populate() to populate default bus
  mips: use of_platform_default_populate() to populate default bus
  arc: use of_platform_default_populate() to populate default bus
  c6x: use of_platform_default_populate() to populate default bus
  metag: use of_platform_default_populate() to populate default bus
  cris: use of_platform_default_populate() to populate default bus
  nios2: use of_platform_default_populate() to populate default bus
  xtensa: use of_platform_default_populate() to populate default bus
  bus: imx-weim: use of_platform_default_populate() to populate default
    bus
  bus: uniphier-system-bus: use of_platform_default_populate() to
    populate default bus
  memory: omap-gpmc: use of_platform_default_populate() to populate
    default bus
  of: unittest: use of_platform_default_populate() to populate default
    bus
  Revert "of/platform: export of_default_bus_match_table"

 arch/arc/kernel/setup.c                  | 2 +-
 arch/arm/kernel/setup.c                  | 3 +--
 arch/arm/mach-at91/at91rm9200.c          | 2 +-
 arch/arm/mach-at91/at91sam9.c            | 2 +-
 arch/arm/mach-at91/sama5.c               | 2 +-
 arch/arm/mach-bcm/board_bcm21664.c       | 2 +-
 arch/arm/mach-bcm/board_bcm281xx.c       | 2 +-
 arch/arm/mach-bcm/board_bcm2835.c        | 5 ++---
 arch/arm/mach-cns3xxx/core.c             | 3 +--
 arch/arm/mach-davinci/da8xx-dt.c         | 3 +--
 arch/arm/mach-exynos/exynos.c            | 2 +-
 arch/arm/mach-highbank/highbank.c        | 2 +-
 arch/arm/mach-imx/imx27-dt.c             | 2 +-
 arch/arm/mach-imx/mach-imx51.c           | 2 +-
 arch/arm/mach-imx/mach-imx53.c           | 2 +-
 arch/arm/mach-imx/mach-imx6q.c           | 2 +-
 arch/arm/mach-imx/mach-imx6sl.c          | 2 +-
 arch/arm/mach-imx/mach-imx6sx.c          | 2 +-
 arch/arm/mach-imx/mach-imx6ul.c          | 2 +-
 arch/arm/mach-imx/mach-imx7d.c           | 2 +-
 arch/arm/mach-integrator/integrator_ap.c | 3 +--
 arch/arm/mach-integrator/integrator_cp.c | 3 +--
 arch/arm/mach-keystone/keystone.c        | 2 +-
 arch/arm/mach-lpc32xx/phy3250.c          | 3 +--
 arch/arm/mach-mvebu/board-v7.c           | 2 +-
 arch/arm/mach-mvebu/dove.c               | 2 +-
 arch/arm/mach-mvebu/kirkwood.c           | 2 +-
 arch/arm/mach-mxs/mach-mxs.c             | 3 +--
 arch/arm/mach-nspire/nspire.c            | 3 +--
 arch/arm/mach-orion5x/board-dt.c         | 3 +--
 arch/arm/mach-picoxcell/common.c         | 2 +-
 arch/arm/mach-pxa/pxa-dt.c               | 3 +--
 arch/arm/mach-rockchip/rockchip.c        | 2 +-
 arch/arm/mach-s3c24xx/mach-s3c2416-dt.c  | 2 +-
 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c  | 2 +-
 arch/arm/mach-shmobile/setup-r8a7740.c   | 2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c    | 2 +-
 arch/arm/mach-spear/spear1310.c          | 2 +-
 arch/arm/mach-spear/spear1340.c          | 2 +-
 arch/arm/mach-spear/spear300.c           | 3 +--
 arch/arm/mach-spear/spear310.c           | 3 +--
 arch/arm/mach-spear/spear320.c           | 3 +--
 arch/arm/mach-spear/spear6xx.c           | 3 +--
 arch/arm/mach-tegra/tegra.c              | 2 +-
 arch/arm/mach-u300/core.c                | 3 +--
 arch/arm/mach-versatile/versatile_dt.c   | 3 +--
 arch/arm/mach-vt8500/vt8500.c            | 2 +-
 arch/arm/mach-zynq/common.c              | 2 +-
 arch/arm64/kernel/setup.c                | 3 +--
 arch/c6x/platforms/platform.c            | 2 +-
 arch/cris/kernel/setup.c                 | 2 +-
 arch/metag/kernel/setup.c                | 3 +--
 arch/mips/ath79/setup.c                  | 2 +-
 arch/mips/jz4740/setup.c                 | 2 +-
 arch/mips/mti-sead3/sead3-setup.c        | 2 +-
 arch/mips/pic32/pic32mzda/init.c         | 3 +--
 arch/mips/pistachio/init.c               | 2 +-
 arch/mips/xilfpga/init.c                 | 2 +-
 arch/nios2/platform/platform.c           | 3 +--
 arch/xtensa/kernel/setup.c               | 2 +-
 drivers/bus/imx-weim.c                   | 5 ++---
 drivers/bus/uniphier-system-bus.c        | 3 +--
 drivers/memory/omap-gpmc.c               | 3 +--
 drivers/of/platform.c                    | 1 -
 drivers/of/unittest.c                    | 5 ++---
 65 files changed, 67 insertions(+), 93 deletions(-)

-- 
2.6.0.GIT

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 01/14] arm: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Nicolas Ferre,
	Ray Jui, Lee Jones, Krzysztof Halasa, Kukjin Kim, Rob Herring,
	Santosh Shilimkar, Roland Stigge, Jason Cooper, Haojian Zhuang,
	Heiko Stuebner, Viresh Kumar, Shiraz Hashim, Tony Prisk

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: Shawn Guo <shawnguo@kernel.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
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>
---
 arch/arm/kernel/setup.c                  | 3 +--
 arch/arm/mach-at91/at91rm9200.c          | 2 +-
 arch/arm/mach-at91/at91sam9.c            | 2 +-
 arch/arm/mach-at91/sama5.c               | 2 +-
 arch/arm/mach-bcm/board_bcm21664.c       | 2 +-
 arch/arm/mach-bcm/board_bcm281xx.c       | 2 +-
 arch/arm/mach-bcm/board_bcm2835.c        | 5 ++---
 arch/arm/mach-cns3xxx/core.c             | 3 +--
 arch/arm/mach-davinci/da8xx-dt.c         | 3 +--
 arch/arm/mach-exynos/exynos.c            | 2 +-
 arch/arm/mach-highbank/highbank.c        | 2 +-
 arch/arm/mach-imx/imx27-dt.c             | 2 +-
 arch/arm/mach-imx/mach-imx51.c           | 2 +-
 arch/arm/mach-imx/mach-imx53.c           | 2 +-
 arch/arm/mach-imx/mach-imx6q.c           | 2 +-
 arch/arm/mach-imx/mach-imx6sl.c          | 2 +-
 arch/arm/mach-imx/mach-imx6sx.c          | 2 +-
 arch/arm/mach-imx/mach-imx6ul.c          | 2 +-
 arch/arm/mach-imx/mach-imx7d.c           | 2 +-
 arch/arm/mach-integrator/integrator_ap.c | 3 +--
 arch/arm/mach-integrator/integrator_cp.c | 3 +--
 arch/arm/mach-keystone/keystone.c        | 2 +-
 arch/arm/mach-lpc32xx/phy3250.c          | 3 +--
 arch/arm/mach-mvebu/board-v7.c           | 2 +-
 arch/arm/mach-mvebu/dove.c               | 2 +-
 arch/arm/mach-mvebu/kirkwood.c           | 2 +-
 arch/arm/mach-mxs/mach-mxs.c             | 3 +--
 arch/arm/mach-nspire/nspire.c            | 3 +--
 arch/arm/mach-orion5x/board-dt.c         | 3 +--
 arch/arm/mach-picoxcell/common.c         | 2 +-
 arch/arm/mach-pxa/pxa-dt.c               | 3 +--
 arch/arm/mach-rockchip/rockchip.c        | 2 +-
 arch/arm/mach-s3c24xx/mach-s3c2416-dt.c  | 2 +-
 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c  | 2 +-
 arch/arm/mach-shmobile/setup-r8a7740.c   | 2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c    | 2 +-
 arch/arm/mach-spear/spear1310.c          | 2 +-
 arch/arm/mach-spear/spear1340.c          | 2 +-
 arch/arm/mach-spear/spear300.c           | 3 +--
 arch/arm/mach-spear/spear310.c           | 3 +--
 arch/arm/mach-spear/spear320.c           | 3 +--
 arch/arm/mach-spear/spear6xx.c           | 3 +--
 arch/arm/mach-tegra/tegra.c              | 2 +-
 arch/arm/mach-u300/core.c                | 3 +--
 arch/arm/mach-versatile/versatile_dt.c   | 3 +--
 arch/arm/mach-vt8500/vt8500.c            | 2 +-
 arch/arm/mach-zynq/common.c              | 2 +-
 47 files changed, 48 insertions(+), 65 deletions(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 7d0cba6f..bdbafe9 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -905,8 +905,7 @@ static int __init customize_machine(void)
 		machine_desc->init_machine();
 #ifdef CONFIG_OF
 	else
-		of_platform_populate(NULL, of_default_bus_match_table,
-					NULL, NULL);
+		of_platform_default_populate(NULL, NULL, NULL);
 #endif
 	return 0;
 }
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index c1a7c6c..e55404a 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -31,7 +31,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);
 
 	arm_pm_idle = at91rm9200_idle;
 	at91rm9200_pm_init();
diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c
index 7eb64f7..d495620 100644
--- a/arch/arm/mach-at91/at91sam9.c
+++ b/arch/arm/mach-at91/at91sam9.c
@@ -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);
 
 	arm_pm_idle = at91sam9_idle;
 }
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index d9cf679..6db395e 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -50,7 +50,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);
 	at91sam9x5_pm_init();
 }
 
diff --git a/arch/arm/mach-bcm/board_bcm21664.c b/arch/arm/mach-bcm/board_bcm21664.c
index 82ad568..b35c31c 100644
--- a/arch/arm/mach-bcm/board_bcm21664.c
+++ b/arch/arm/mach-bcm/board_bcm21664.c
@@ -60,7 +60,7 @@ static void bcm21664_restart(enum reboot_mode mode, const char *cmd)
 
 static void __init bcm21664_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	kona_l2_cache_init();
 }
 
diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c
index 2e367bd..bf74547 100644
--- a/arch/arm/mach-bcm/board_bcm281xx.c
+++ b/arch/arm/mach-bcm/board_bcm281xx.c
@@ -58,7 +58,7 @@ static void bcm281xx_restart(enum reboot_mode mode, const char *cmd)
 
 static void __init bcm281xx_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	kona_l2_cache_init();
 }
 
diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c
index 834d676..fd190bb 100644
--- a/arch/arm/mach-bcm/board_bcm2835.c
+++ b/arch/arm/mach-bcm/board_bcm2835.c
@@ -27,10 +27,9 @@ static void __init bcm2835_init(void)
 
 	bcm2835_init_clocks();
 
-	ret = of_platform_populate(NULL, of_default_bus_match_table, NULL,
-				   NULL);
+	ret = of_platform_default_populate(NULL, NULL, NULL);
 	if (ret) {
-		pr_err("of_platform_populate failed: %d\n", ret);
+		pr_err("of_platform_default_populate failed: %d\n", ret);
 		BUG();
 	}
 }
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
index 9b1dc22..03da381 100644
--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -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 = {
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index c4b5808..da46dc7 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -54,8 +54,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 
 static void __init da850_init_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     da850_auxdata_lookup, NULL);
+	of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
 
 }
 
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 1c47aee..7bbdaae 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -271,7 +271,7 @@ static void __init exynos_dt_machine_init(void)
 
 	exynos_cpufreq_init();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static char const *const exynos_dt_compat[] __initconst = {
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 6050a14..2e2d5df 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -163,7 +163,7 @@ static void __init highbank_init(void)
 
 	pl320_ipc_register_notifier(&hb_keys_nb);
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 
 	if (psci_ops.cpu_suspend)
 		platform_device_register(&highbank_cpuidle_device);
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index bd42d1b..265dd08 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -22,7 +22,7 @@ static void __init imx27_dt_init(void)
 {
 	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 
 	platform_device_register_full(&devinfo);
 }
diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
index b015129..4a9852c 100644
--- a/arch/arm/mach-imx/mach-imx51.c
+++ b/arch/arm/mach-imx/mach-imx51.c
@@ -56,7 +56,7 @@ static void __init imx51_dt_init(void)
 	imx51_ipu_mipi_setup();
 	imx_src_init();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	platform_device_register_full(&devinfo);
 }
 
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 86316a9..6e915c3 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -32,7 +32,7 @@ static void __init imx53_dt_init(void)
 {
 	imx_src_init();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 
 	imx_aips_allow_unprivileged_access("fsl,imx53-aipstz");
 }
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 3878494b..1b09843 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -275,7 +275,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();
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index 3003263..37ae87d 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -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();
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index 6a0b061..107cfc1 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -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();
diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
index a38b16b..fa9b512 100644
--- a/arch/arm/mach-imx/mach-imx6ul.c
+++ b/arch/arm/mach-imx/mach-imx6ul.c
@@ -64,7 +64,7 @@ static void __init imx6ul_init_machine(void)
 	if (parent == NULL)
 		pr_warn("failed to initialize soc device\n");
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	imx6ul_enet_init();
 	imx_anatop_init();
 	imx6ul_pm_init();
diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
index 5a27f20..f5a60fb 100644
--- a/arch/arm/mach-imx/mach-imx7d.c
+++ b/arch/arm/mach-imx/mach-imx7d.c
@@ -93,7 +93,7 @@ static void __init imx7d_init_machine(void)
 	if (parent == NULL)
 		pr_warn("failed to initialize soc device\n");
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	imx_anatop_init();
 	imx7d_enet_init();
 }
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 5b0e363..4c2facd 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -302,8 +302,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++) {
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index b5fb71a..31d893e 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -282,8 +282,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[] = {
diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
index c279293..67c3802 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -60,7 +60,7 @@ static void __init keystone_init(void)
 		bus_register_notifier(&platform_bus_type, &platform_nb);
 	}
 	keystone_pm_runtime_init();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static phys_addr_t keystone_virt_to_idmap(unsigned long x)
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index 77d6b1b..611ae6c 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -244,8 +244,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 = {
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 1648edd..3482539 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -145,7 +145,7 @@ static void __init mvebu_dt_init(void)
 	if (of_machine_is_compatible("marvell,armadaxp"))
 		i2c_quirk();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char * const armada_370_xp_dt_compat[] __initconst = {
diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c
index 1aebb82..18130e9 100644
--- a/arch/arm/mach-mvebu/dove.c
+++ b/arch/arm/mach-mvebu/dove.c
@@ -26,7 +26,7 @@ static void __init dove_init(void)
 #endif
 	BUG_ON(mvebu_mbus_dt_init(false));
 	dove_init_pmu();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char * const dove_dt_compat[] __initconst = {
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index f9d8e1e..8f459ee 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -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 = {
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index f1ea470..0b7fe74 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -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();
 
diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c
index 34c2a1b3..f0808fc 100644
--- a/arch/arm/mach-nspire/nspire.c
+++ b/arch/arm/mach-nspire/nspire.c
@@ -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)
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c
index 6f4c2c4..3d36f1d 100644
--- a/arch/arm/mach-orion5x/board-dt.c
+++ b/arch/arm/mach-orion5x/board-dt.c
@@ -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[] = {
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c
index ec79fea..add8622 100644
--- a/arch/arm/mach-picoxcell/common.c
+++ b/arch/arm/mach-picoxcell/common.c
@@ -54,7 +54,7 @@ static void __init picoxcell_map_io(void)
 
 static void __init picoxcell_init_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	picoxcell_setup_restart();
 }
 
diff --git a/arch/arm/mach-pxa/pxa-dt.c b/arch/arm/mach-pxa/pxa-dt.c
index 8e0e62c..017e0d1 100644
--- a/arch/arm/mach-pxa/pxa-dt.c
+++ b/arch/arm/mach-pxa/pxa-dt.c
@@ -35,8 +35,7 @@ static const struct of_dev_auxdata const pxa3xx_auxdata_lookup[] __initconst = {
 
 static void __init pxa3xx_dt_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     pxa3xx_auxdata_lookup, NULL);
+	of_platform_default_populate(NULL, pxa3xx_auxdata_lookup, NULL);
 }
 
 static const char *const pxa3xx_dt_board_compat[] __initconst = {
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 3f07cc5..07ef8ef 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -73,7 +73,7 @@ static void __init rockchip_timer_init(void)
 static void __init rockchip_dt_init(void)
 {
 	rockchip_suspend_init();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
index 5f028ff..5991e98 100644
--- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
@@ -35,7 +35,7 @@ static void __init s3c2416_dt_map_io(void)
 
 static void __init s3c2416_dt_machine_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	s3c_pm_init();
 }
 
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
index bbf74ed..ebc9d5f 100644
--- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
+++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
@@ -48,7 +48,7 @@ static void __init s3c64xx_dt_map_io(void)
 static void __init s3c64xx_dt_init_machine(void)
 {
 	samsung_wdt_reset_of_init();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 0c8f80c..1eabb99 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -114,7 +114,7 @@ static void __init r8a7740_generic_init(void)
 	/* Shared attribute override enable, 32K*8way */
 	l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
 #endif
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char *const r8a7740_boards_compat_dt[] __initconst = {
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 99a2004..af38daf 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -55,7 +55,7 @@ static void __init sh73a0_generic_init(void)
 	/* Shared attribute override enable, 64K*8way */
 	l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
 #endif
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char *const sh73a0_boards_compat_dt[] __initconst = {
diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
index cd5d375..3f5efcb 100644
--- a/arch/arm/mach-spear/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -27,7 +27,7 @@
 
 static void __init spear1310_dt_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
 }
 
diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c
index 94594d5..30969b6 100644
--- a/arch/arm/mach-spear/spear1340.c
+++ b/arch/arm/mach-spear/spear1340.c
@@ -19,7 +19,7 @@
 
 static void __init spear1340_dt_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
 }
 
diff --git a/arch/arm/mach-spear/spear300.c b/arch/arm/mach-spear/spear300.c
index 5b32edd..325b895 100644
--- a/arch/arm/mach-spear/spear300.c
+++ b/arch/arm/mach-spear/spear300.c
@@ -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[] = {
diff --git a/arch/arm/mach-spear/spear310.c b/arch/arm/mach-spear/spear310.c
index 86a44ac..59e173d 100644
--- a/arch/arm/mach-spear/spear310.c
+++ b/arch/arm/mach-spear/spear310.c
@@ -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[] = {
diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c
index d45d751..0958f68 100644
--- a/arch/arm/mach-spear/spear320.c
+++ b/arch/arm/mach-spear/spear320.c
@@ -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[] = {
diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index da26fa5b..ccf3573 100644
--- a/arch/arm/mach-spear/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -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[] = {
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c
index 2378fa56..6745a65 100644
--- a/arch/arm/mach-tegra/tegra.c
+++ b/arch/arm/mach-tegra/tegra.c
@@ -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)
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 546338b..a4910ea 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -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) |
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index c448718..1a36c97 100644
--- a/arch/arm/mach-versatile/versatile_dt.c
+++ b/arch/arm/mach-versatile/versatile_dt.c
@@ -405,8 +405,7 @@ static void __init versatile_dt_init(void)
 	versatile_dt_pci_init();
 
 	platform_device_register(&versatile_flash_device);
-	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 = {
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
index 3bc0dc9..69bb16c 100644
--- a/arch/arm/mach-vt8500/vt8500.c
+++ b/arch/arm/mach-vt8500/vt8500.c
@@ -159,7 +159,7 @@ static void __init vt8500_init(void)
 	else
 		pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char * const vt8500_dt_compat[] = {
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 6f39d03..563575d 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -142,7 +142,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);
 	platform_device_register_full(&devinfo);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 01/14] arm: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

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: Shawn Guo <shawnguo@kernel.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
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>
---
 arch/arm/kernel/setup.c                  | 3 +--
 arch/arm/mach-at91/at91rm9200.c          | 2 +-
 arch/arm/mach-at91/at91sam9.c            | 2 +-
 arch/arm/mach-at91/sama5.c               | 2 +-
 arch/arm/mach-bcm/board_bcm21664.c       | 2 +-
 arch/arm/mach-bcm/board_bcm281xx.c       | 2 +-
 arch/arm/mach-bcm/board_bcm2835.c        | 5 ++---
 arch/arm/mach-cns3xxx/core.c             | 3 +--
 arch/arm/mach-davinci/da8xx-dt.c         | 3 +--
 arch/arm/mach-exynos/exynos.c            | 2 +-
 arch/arm/mach-highbank/highbank.c        | 2 +-
 arch/arm/mach-imx/imx27-dt.c             | 2 +-
 arch/arm/mach-imx/mach-imx51.c           | 2 +-
 arch/arm/mach-imx/mach-imx53.c           | 2 +-
 arch/arm/mach-imx/mach-imx6q.c           | 2 +-
 arch/arm/mach-imx/mach-imx6sl.c          | 2 +-
 arch/arm/mach-imx/mach-imx6sx.c          | 2 +-
 arch/arm/mach-imx/mach-imx6ul.c          | 2 +-
 arch/arm/mach-imx/mach-imx7d.c           | 2 +-
 arch/arm/mach-integrator/integrator_ap.c | 3 +--
 arch/arm/mach-integrator/integrator_cp.c | 3 +--
 arch/arm/mach-keystone/keystone.c        | 2 +-
 arch/arm/mach-lpc32xx/phy3250.c          | 3 +--
 arch/arm/mach-mvebu/board-v7.c           | 2 +-
 arch/arm/mach-mvebu/dove.c               | 2 +-
 arch/arm/mach-mvebu/kirkwood.c           | 2 +-
 arch/arm/mach-mxs/mach-mxs.c             | 3 +--
 arch/arm/mach-nspire/nspire.c            | 3 +--
 arch/arm/mach-orion5x/board-dt.c         | 3 +--
 arch/arm/mach-picoxcell/common.c         | 2 +-
 arch/arm/mach-pxa/pxa-dt.c               | 3 +--
 arch/arm/mach-rockchip/rockchip.c        | 2 +-
 arch/arm/mach-s3c24xx/mach-s3c2416-dt.c  | 2 +-
 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c  | 2 +-
 arch/arm/mach-shmobile/setup-r8a7740.c   | 2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c    | 2 +-
 arch/arm/mach-spear/spear1310.c          | 2 +-
 arch/arm/mach-spear/spear1340.c          | 2 +-
 arch/arm/mach-spear/spear300.c           | 3 +--
 arch/arm/mach-spear/spear310.c           | 3 +--
 arch/arm/mach-spear/spear320.c           | 3 +--
 arch/arm/mach-spear/spear6xx.c           | 3 +--
 arch/arm/mach-tegra/tegra.c              | 2 +-
 arch/arm/mach-u300/core.c                | 3 +--
 arch/arm/mach-versatile/versatile_dt.c   | 3 +--
 arch/arm/mach-vt8500/vt8500.c            | 2 +-
 arch/arm/mach-zynq/common.c              | 2 +-
 47 files changed, 48 insertions(+), 65 deletions(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 7d0cba6f..bdbafe9 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -905,8 +905,7 @@ static int __init customize_machine(void)
 		machine_desc->init_machine();
 #ifdef CONFIG_OF
 	else
-		of_platform_populate(NULL, of_default_bus_match_table,
-					NULL, NULL);
+		of_platform_default_populate(NULL, NULL, NULL);
 #endif
 	return 0;
 }
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index c1a7c6c..e55404a 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -31,7 +31,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);
 
 	arm_pm_idle = at91rm9200_idle;
 	at91rm9200_pm_init();
diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c
index 7eb64f7..d495620 100644
--- a/arch/arm/mach-at91/at91sam9.c
+++ b/arch/arm/mach-at91/at91sam9.c
@@ -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);
 
 	arm_pm_idle = at91sam9_idle;
 }
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index d9cf679..6db395e 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -50,7 +50,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);
 	at91sam9x5_pm_init();
 }
 
diff --git a/arch/arm/mach-bcm/board_bcm21664.c b/arch/arm/mach-bcm/board_bcm21664.c
index 82ad568..b35c31c 100644
--- a/arch/arm/mach-bcm/board_bcm21664.c
+++ b/arch/arm/mach-bcm/board_bcm21664.c
@@ -60,7 +60,7 @@ static void bcm21664_restart(enum reboot_mode mode, const char *cmd)
 
 static void __init bcm21664_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	kona_l2_cache_init();
 }
 
diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c
index 2e367bd..bf74547 100644
--- a/arch/arm/mach-bcm/board_bcm281xx.c
+++ b/arch/arm/mach-bcm/board_bcm281xx.c
@@ -58,7 +58,7 @@ static void bcm281xx_restart(enum reboot_mode mode, const char *cmd)
 
 static void __init bcm281xx_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	kona_l2_cache_init();
 }
 
diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c
index 834d676..fd190bb 100644
--- a/arch/arm/mach-bcm/board_bcm2835.c
+++ b/arch/arm/mach-bcm/board_bcm2835.c
@@ -27,10 +27,9 @@ static void __init bcm2835_init(void)
 
 	bcm2835_init_clocks();
 
-	ret = of_platform_populate(NULL, of_default_bus_match_table, NULL,
-				   NULL);
+	ret = of_platform_default_populate(NULL, NULL, NULL);
 	if (ret) {
-		pr_err("of_platform_populate failed: %d\n", ret);
+		pr_err("of_platform_default_populate failed: %d\n", ret);
 		BUG();
 	}
 }
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
index 9b1dc22..03da381 100644
--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -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 = {
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index c4b5808..da46dc7 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -54,8 +54,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 
 static void __init da850_init_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     da850_auxdata_lookup, NULL);
+	of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
 
 }
 
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 1c47aee..7bbdaae 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -271,7 +271,7 @@ static void __init exynos_dt_machine_init(void)
 
 	exynos_cpufreq_init();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static char const *const exynos_dt_compat[] __initconst = {
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 6050a14..2e2d5df 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -163,7 +163,7 @@ static void __init highbank_init(void)
 
 	pl320_ipc_register_notifier(&hb_keys_nb);
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 
 	if (psci_ops.cpu_suspend)
 		platform_device_register(&highbank_cpuidle_device);
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index bd42d1b..265dd08 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -22,7 +22,7 @@ static void __init imx27_dt_init(void)
 {
 	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 
 	platform_device_register_full(&devinfo);
 }
diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
index b015129..4a9852c 100644
--- a/arch/arm/mach-imx/mach-imx51.c
+++ b/arch/arm/mach-imx/mach-imx51.c
@@ -56,7 +56,7 @@ static void __init imx51_dt_init(void)
 	imx51_ipu_mipi_setup();
 	imx_src_init();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	platform_device_register_full(&devinfo);
 }
 
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 86316a9..6e915c3 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -32,7 +32,7 @@ static void __init imx53_dt_init(void)
 {
 	imx_src_init();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 
 	imx_aips_allow_unprivileged_access("fsl,imx53-aipstz");
 }
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 3878494b..1b09843 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -275,7 +275,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();
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index 3003263..37ae87d 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -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();
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index 6a0b061..107cfc1 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -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();
diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
index a38b16b..fa9b512 100644
--- a/arch/arm/mach-imx/mach-imx6ul.c
+++ b/arch/arm/mach-imx/mach-imx6ul.c
@@ -64,7 +64,7 @@ static void __init imx6ul_init_machine(void)
 	if (parent == NULL)
 		pr_warn("failed to initialize soc device\n");
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	imx6ul_enet_init();
 	imx_anatop_init();
 	imx6ul_pm_init();
diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
index 5a27f20..f5a60fb 100644
--- a/arch/arm/mach-imx/mach-imx7d.c
+++ b/arch/arm/mach-imx/mach-imx7d.c
@@ -93,7 +93,7 @@ static void __init imx7d_init_machine(void)
 	if (parent == NULL)
 		pr_warn("failed to initialize soc device\n");
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	imx_anatop_init();
 	imx7d_enet_init();
 }
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 5b0e363..4c2facd 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -302,8 +302,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++) {
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index b5fb71a..31d893e 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -282,8 +282,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[] = {
diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
index c279293..67c3802 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -60,7 +60,7 @@ static void __init keystone_init(void)
 		bus_register_notifier(&platform_bus_type, &platform_nb);
 	}
 	keystone_pm_runtime_init();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static phys_addr_t keystone_virt_to_idmap(unsigned long x)
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index 77d6b1b..611ae6c 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -244,8 +244,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 = {
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 1648edd..3482539 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -145,7 +145,7 @@ static void __init mvebu_dt_init(void)
 	if (of_machine_is_compatible("marvell,armadaxp"))
 		i2c_quirk();
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char * const armada_370_xp_dt_compat[] __initconst = {
diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c
index 1aebb82..18130e9 100644
--- a/arch/arm/mach-mvebu/dove.c
+++ b/arch/arm/mach-mvebu/dove.c
@@ -26,7 +26,7 @@ static void __init dove_init(void)
 #endif
 	BUG_ON(mvebu_mbus_dt_init(false));
 	dove_init_pmu();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char * const dove_dt_compat[] __initconst = {
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index f9d8e1e..8f459ee 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -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 = {
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index f1ea470..0b7fe74 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -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();
 
diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c
index 34c2a1b3..f0808fc 100644
--- a/arch/arm/mach-nspire/nspire.c
+++ b/arch/arm/mach-nspire/nspire.c
@@ -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)
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c
index 6f4c2c4..3d36f1d 100644
--- a/arch/arm/mach-orion5x/board-dt.c
+++ b/arch/arm/mach-orion5x/board-dt.c
@@ -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[] = {
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c
index ec79fea..add8622 100644
--- a/arch/arm/mach-picoxcell/common.c
+++ b/arch/arm/mach-picoxcell/common.c
@@ -54,7 +54,7 @@ static void __init picoxcell_map_io(void)
 
 static void __init picoxcell_init_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	picoxcell_setup_restart();
 }
 
diff --git a/arch/arm/mach-pxa/pxa-dt.c b/arch/arm/mach-pxa/pxa-dt.c
index 8e0e62c..017e0d1 100644
--- a/arch/arm/mach-pxa/pxa-dt.c
+++ b/arch/arm/mach-pxa/pxa-dt.c
@@ -35,8 +35,7 @@ static const struct of_dev_auxdata const pxa3xx_auxdata_lookup[] __initconst = {
 
 static void __init pxa3xx_dt_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     pxa3xx_auxdata_lookup, NULL);
+	of_platform_default_populate(NULL, pxa3xx_auxdata_lookup, NULL);
 }
 
 static const char *const pxa3xx_dt_board_compat[] __initconst = {
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 3f07cc5..07ef8ef 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -73,7 +73,7 @@ static void __init rockchip_timer_init(void)
 static void __init rockchip_dt_init(void)
 {
 	rockchip_suspend_init();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
index 5f028ff..5991e98 100644
--- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
@@ -35,7 +35,7 @@ static void __init s3c2416_dt_map_io(void)
 
 static void __init s3c2416_dt_machine_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	s3c_pm_init();
 }
 
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
index bbf74ed..ebc9d5f 100644
--- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
+++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
@@ -48,7 +48,7 @@ static void __init s3c64xx_dt_map_io(void)
 static void __init s3c64xx_dt_init_machine(void)
 {
 	samsung_wdt_reset_of_init();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 0c8f80c..1eabb99 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -114,7 +114,7 @@ static void __init r8a7740_generic_init(void)
 	/* Shared attribute override enable, 32K*8way */
 	l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
 #endif
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char *const r8a7740_boards_compat_dt[] __initconst = {
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 99a2004..af38daf 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -55,7 +55,7 @@ static void __init sh73a0_generic_init(void)
 	/* Shared attribute override enable, 64K*8way */
 	l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
 #endif
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char *const sh73a0_boards_compat_dt[] __initconst = {
diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
index cd5d375..3f5efcb 100644
--- a/arch/arm/mach-spear/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -27,7 +27,7 @@
 
 static void __init spear1310_dt_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
 }
 
diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c
index 94594d5..30969b6 100644
--- a/arch/arm/mach-spear/spear1340.c
+++ b/arch/arm/mach-spear/spear1340.c
@@ -19,7 +19,7 @@
 
 static void __init spear1340_dt_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
 }
 
diff --git a/arch/arm/mach-spear/spear300.c b/arch/arm/mach-spear/spear300.c
index 5b32edd..325b895 100644
--- a/arch/arm/mach-spear/spear300.c
+++ b/arch/arm/mach-spear/spear300.c
@@ -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[] = {
diff --git a/arch/arm/mach-spear/spear310.c b/arch/arm/mach-spear/spear310.c
index 86a44ac..59e173d 100644
--- a/arch/arm/mach-spear/spear310.c
+++ b/arch/arm/mach-spear/spear310.c
@@ -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[] = {
diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c
index d45d751..0958f68 100644
--- a/arch/arm/mach-spear/spear320.c
+++ b/arch/arm/mach-spear/spear320.c
@@ -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[] = {
diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index da26fa5b..ccf3573 100644
--- a/arch/arm/mach-spear/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -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[] = {
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c
index 2378fa56..6745a65 100644
--- a/arch/arm/mach-tegra/tegra.c
+++ b/arch/arm/mach-tegra/tegra.c
@@ -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)
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 546338b..a4910ea 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -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) |
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index c448718..1a36c97 100644
--- a/arch/arm/mach-versatile/versatile_dt.c
+++ b/arch/arm/mach-versatile/versatile_dt.c
@@ -405,8 +405,7 @@ static void __init versatile_dt_init(void)
 	versatile_dt_pci_init();
 
 	platform_device_register(&versatile_flash_device);
-	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 = {
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
index 3bc0dc9..69bb16c 100644
--- a/arch/arm/mach-vt8500/vt8500.c
+++ b/arch/arm/mach-vt8500/vt8500.c
@@ -159,7 +159,7 @@ static void __init vt8500_init(void)
 	else
 		pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
 
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char * const vt8500_dt_compat[] = {
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 6f39d03..563575d 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -142,7 +142,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);
 	platform_device_register_full(&devinfo);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 02/14] arm64: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Will Deacon

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: Catalin Marinas <catalin.marinas@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/arm64/kernel/setup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 8119479..43a3058 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -359,8 +359,7 @@ static int __init arm64_device_init(void)
 {
 	if (of_have_populated_dt()) {
 		of_iommu_init();
-		of_platform_populate(NULL, of_default_bus_match_table,
-				     NULL, NULL);
+		of_platform_default_populate(NULL, NULL, NULL);
 	} else if (acpi_disabled) {
 		pr_crit("Device tree not populated\n");
 	}
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 02/14] arm64: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

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: Catalin Marinas <catalin.marinas@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/arm64/kernel/setup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 8119479..43a3058 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -359,8 +359,7 @@ static int __init arm64_device_init(void)
 {
 	if (of_have_populated_dt()) {
 		of_iommu_init();
-		of_platform_populate(NULL, of_default_bus_match_table,
-				     NULL, NULL);
+		of_platform_default_populate(NULL, NULL, NULL);
 	} else if (acpi_disabled) {
 		pr_crit("Device tree not populated\n");
 	}
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 03/14] mips: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Ralf Baechle

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Tested-by: Joshua Henderson <joshua.henderson@microchip.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/mips/ath79/setup.c           | 2 +-
 arch/mips/jz4740/setup.c          | 2 +-
 arch/mips/mti-sead3/sead3-setup.c | 2 +-
 arch/mips/pic32/pic32mzda/init.c  | 3 +--
 arch/mips/pistachio/init.c        | 2 +-
 arch/mips/xilfpga/init.c          | 2 +-
 6 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index be451ee4a..51deb50 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -248,7 +248,7 @@ void __init plat_time_init(void)
 
 static int __init ath79_setup(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	if  (mips_machtype == ATH79_MACH_GENERIC_OF)
 		return 0;
 
diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c
index 510fc0d..d175c74 100644
--- a/arch/mips/jz4740/setup.c
+++ b/arch/mips/jz4740/setup.c
@@ -76,7 +76,7 @@ void __init device_tree_init(void)
 
 static int __init populate_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 arch_initcall(populate_machine);
diff --git a/arch/mips/mti-sead3/sead3-setup.c b/arch/mips/mti-sead3/sead3-setup.c
index e43f480..bc73f32 100644
--- a/arch/mips/mti-sead3/sead3-setup.c
+++ b/arch/mips/mti-sead3/sead3-setup.c
@@ -105,7 +105,7 @@ void __init device_tree_init(void)
 
 static int __init customize_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 arch_initcall(customize_machine);
diff --git a/arch/mips/pic32/pic32mzda/init.c b/arch/mips/pic32/pic32mzda/init.c
index 775ff90..77ecf32 100644
--- a/arch/mips/pic32/pic32mzda/init.c
+++ b/arch/mips/pic32/pic32mzda/init.c
@@ -147,8 +147,7 @@ static int __init plat_of_setup(void)
 		panic("Device tree not present");
 
 	pic32_of_prepare_platform_data(pic32_auxdata_lookup);
-	if (of_platform_populate(NULL, of_default_bus_match_table,
-				 pic32_auxdata_lookup, NULL))
+	if (of_platform_default_populate(NULL, pic32_auxdata_lookup, NULL))
 		panic("Failed to populate DT");
 
 	return 0;
diff --git a/arch/mips/pistachio/init.c b/arch/mips/pistachio/init.c
index 96ba2cc..0bc25e3 100644
--- a/arch/mips/pistachio/init.c
+++ b/arch/mips/pistachio/init.c
@@ -128,7 +128,7 @@ static int __init plat_of_setup(void)
 	if (!of_have_populated_dt())
 		panic("Device tree not present");
 
-	if (of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL))
+	if (of_platform_default_populate(NULL, NULL, NULL))
 		panic("Failed to populate DT");
 
 	return 0;
diff --git a/arch/mips/xilfpga/init.c b/arch/mips/xilfpga/init.c
index ce2aee2..a97382f 100644
--- a/arch/mips/xilfpga/init.c
+++ b/arch/mips/xilfpga/init.c
@@ -49,7 +49,7 @@ static int __init plat_of_setup(void)
 	if (!of_have_populated_dt())
 		panic("Device tree not present");
 
-	if (of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL))
+	if (of_platform_default_populate(NULL, NULL, NULL))
 		panic("Failed to populate DT");
 
 	return 0;
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 03/14] mips: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Tested-by: Joshua Henderson <joshua.henderson@microchip.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/mips/ath79/setup.c           | 2 +-
 arch/mips/jz4740/setup.c          | 2 +-
 arch/mips/mti-sead3/sead3-setup.c | 2 +-
 arch/mips/pic32/pic32mzda/init.c  | 3 +--
 arch/mips/pistachio/init.c        | 2 +-
 arch/mips/xilfpga/init.c          | 2 +-
 6 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index be451ee4a..51deb50 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -248,7 +248,7 @@ void __init plat_time_init(void)
 
 static int __init ath79_setup(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	if  (mips_machtype == ATH79_MACH_GENERIC_OF)
 		return 0;
 
diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c
index 510fc0d..d175c74 100644
--- a/arch/mips/jz4740/setup.c
+++ b/arch/mips/jz4740/setup.c
@@ -76,7 +76,7 @@ void __init device_tree_init(void)
 
 static int __init populate_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 arch_initcall(populate_machine);
diff --git a/arch/mips/mti-sead3/sead3-setup.c b/arch/mips/mti-sead3/sead3-setup.c
index e43f480..bc73f32 100644
--- a/arch/mips/mti-sead3/sead3-setup.c
+++ b/arch/mips/mti-sead3/sead3-setup.c
@@ -105,7 +105,7 @@ void __init device_tree_init(void)
 
 static int __init customize_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 arch_initcall(customize_machine);
diff --git a/arch/mips/pic32/pic32mzda/init.c b/arch/mips/pic32/pic32mzda/init.c
index 775ff90..77ecf32 100644
--- a/arch/mips/pic32/pic32mzda/init.c
+++ b/arch/mips/pic32/pic32mzda/init.c
@@ -147,8 +147,7 @@ static int __init plat_of_setup(void)
 		panic("Device tree not present");
 
 	pic32_of_prepare_platform_data(pic32_auxdata_lookup);
-	if (of_platform_populate(NULL, of_default_bus_match_table,
-				 pic32_auxdata_lookup, NULL))
+	if (of_platform_default_populate(NULL, pic32_auxdata_lookup, NULL))
 		panic("Failed to populate DT");
 
 	return 0;
diff --git a/arch/mips/pistachio/init.c b/arch/mips/pistachio/init.c
index 96ba2cc..0bc25e3 100644
--- a/arch/mips/pistachio/init.c
+++ b/arch/mips/pistachio/init.c
@@ -128,7 +128,7 @@ static int __init plat_of_setup(void)
 	if (!of_have_populated_dt())
 		panic("Device tree not present");
 
-	if (of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL))
+	if (of_platform_default_populate(NULL, NULL, NULL))
 		panic("Failed to populate DT");
 
 	return 0;
diff --git a/arch/mips/xilfpga/init.c b/arch/mips/xilfpga/init.c
index ce2aee2..a97382f 100644
--- a/arch/mips/xilfpga/init.c
+++ b/arch/mips/xilfpga/init.c
@@ -49,7 +49,7 @@ static int __init plat_of_setup(void)
 	if (!of_have_populated_dt())
 		panic("Device tree not present");
 
-	if (of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL))
+	if (of_platform_default_populate(NULL, NULL, NULL))
 		panic("Failed to populate DT");
 
 	return 0;
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Vineet Gupta

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: Vineet Gupta <vgupta@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/arc/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index cdc821d..401f51f 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -464,7 +464,7 @@ static int __init customize_machine(void)
 	 * Traverses flattened DeviceTree - registering platform devices
 	 * (if any) complete with their resources
 	 */
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 
 	if (machine_desc->init_machine)
 		machine_desc->init_machine();
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

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: Vineet Gupta <vgupta@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/arc/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index cdc821d..401f51f 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -464,7 +464,7 @@ static int __init customize_machine(void)
 	 * Traverses flattened DeviceTree - registering platform devices
 	 * (if any) complete with their resources
 	 */
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 
 	if (machine_desc->init_machine)
 		machine_desc->init_machine();
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 05/14] c6x: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Mark Salter,
	Aurelien Jacquiot

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: Mark Salter <msalter@redhat.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/c6x/platforms/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/c6x/platforms/platform.c b/arch/c6x/platforms/platform.c
index 26c1a35..8412334 100644
--- a/arch/c6x/platforms/platform.c
+++ b/arch/c6x/platforms/platform.c
@@ -11,7 +11,7 @@
 
 static int __init c6x_device_probe(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 core_initcall(c6x_device_probe);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 05/14] c6x: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

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: Mark Salter <msalter@redhat.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/c6x/platforms/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/c6x/platforms/platform.c b/arch/c6x/platforms/platform.c
index 26c1a35..8412334 100644
--- a/arch/c6x/platforms/platform.c
+++ b/arch/c6x/platforms/platform.c
@@ -11,7 +11,7 @@
 
 static int __init c6x_device_probe(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 core_initcall(c6x_device_probe);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 06/14] metag: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, James Hogan

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: James Hogan <james.hogan@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/metag/kernel/setup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/metag/kernel/setup.c b/arch/metag/kernel/setup.c
index 31cf53d..c88f937 100644
--- a/arch/metag/kernel/setup.c
+++ b/arch/metag/kernel/setup.c
@@ -415,8 +415,7 @@ static int __init customize_machine(void)
 	if (machine_desc->init_machine)
 		machine_desc->init_machine();
 	else
-		of_platform_populate(NULL, of_default_bus_match_table, NULL,
-				     NULL);
+		of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 arch_initcall(customize_machine);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 06/14] metag: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

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: James Hogan <james.hogan@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/metag/kernel/setup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/metag/kernel/setup.c b/arch/metag/kernel/setup.c
index 31cf53d..c88f937 100644
--- a/arch/metag/kernel/setup.c
+++ b/arch/metag/kernel/setup.c
@@ -415,8 +415,7 @@ static int __init customize_machine(void)
 	if (machine_desc->init_machine)
 		machine_desc->init_machine();
 	else
-		of_platform_populate(NULL, of_default_bus_match_table, NULL,
-				     NULL);
+		of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 arch_initcall(customize_machine);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 07/14] cris: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun,
	Mikael Starvik, Jesper Nilsson

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/cris/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
index bb12aa9..5ee5dfc 100644
--- a/arch/cris/kernel/setup.c
+++ b/arch/cris/kernel/setup.c
@@ -215,7 +215,7 @@ subsys_initcall(topology_init);
 
 static int __init cris_of_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 core_initcall(cris_of_init);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 07/14] cris: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/cris/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
index bb12aa9..5ee5dfc 100644
--- a/arch/cris/kernel/setup.c
+++ b/arch/cris/kernel/setup.c
@@ -215,7 +215,7 @@ subsys_initcall(topology_init);
 
 static int __init cris_of_init(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 core_initcall(cris_of_init);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 08/14] nios2: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Ley Foon Tan

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/nios2/platform/platform.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/nios2/platform/platform.c b/arch/nios2/platform/platform.c
index d478773..c62279c 100644
--- a/arch/nios2/platform/platform.c
+++ b/arch/nios2/platform/platform.c
@@ -39,8 +39,7 @@ static int __init nios2_soc_device_init(void)
 		}
 	}
 
-	return of_platform_populate(NULL, of_default_bus_match_table,
-		NULL, NULL);
+	return of_platform_default_populate(NULL, NULL, NULL);
 }
 
 device_initcall(nios2_soc_device_init);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 08/14] nios2: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/nios2/platform/platform.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/nios2/platform/platform.c b/arch/nios2/platform/platform.c
index d478773..c62279c 100644
--- a/arch/nios2/platform/platform.c
+++ b/arch/nios2/platform/platform.c
@@ -39,8 +39,7 @@ static int __init nios2_soc_device_init(void)
 		}
 	}
 
-	return of_platform_populate(NULL, of_default_bus_match_table,
-		NULL, NULL);
+	return of_platform_default_populate(NULL, NULL, NULL);
 }
 
 device_initcall(nios2_soc_device_init);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 09/14] xtensa: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Chris Zankel,
	Max Filippov

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: Max Filippov <jcmvbkbc@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/xtensa/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 9735691..1b17fe9 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -255,7 +255,7 @@ void __init early_init_devtree(void *params)
 static int __init xtensa_device_probe(void)
 {
 	of_clk_init(NULL);
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 09/14] xtensa: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

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: Max Filippov <jcmvbkbc@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/xtensa/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 9735691..1b17fe9 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -255,7 +255,7 @@ void __init early_init_devtree(void *params)
 static int __init xtensa_device_probe(void)
 {
 	of_clk_init(NULL);
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(NULL, NULL, NULL);
 	return 0;
 }
 
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 10/14] bus: imx-weim: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun,
	Signed-off-by : Huang Shijie, Shawn Guo

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: Shawn Guo <shawn.guo@linaro.org>
Cc: Signed-off-by: Huang Shijie <b32955@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/bus/imx-weim.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index e98d15e..79a4fa3 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -163,9 +163,8 @@ static int __init weim_parse_dt(struct platform_device *pdev,
 	}
 
 	if (have_child)
-		ret = of_platform_populate(pdev->dev.of_node,
-				   of_default_bus_match_table,
-				   NULL, &pdev->dev);
+		ret = of_platform_default_populate(pdev->dev.of_node,
+						   NULL, &pdev->dev);
 	if (ret)
 		dev_err(&pdev->dev, "%s fail to create devices.\n",
 			pdev->dev.of_node->full_name);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 10/14] bus: imx-weim: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

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: Shawn Guo <shawn.guo@linaro.org>
Cc: Signed-off-by: Huang Shijie <b32955@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/bus/imx-weim.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index e98d15e..79a4fa3 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -163,9 +163,8 @@ static int __init weim_parse_dt(struct platform_device *pdev,
 	}
 
 	if (have_child)
-		ret = of_platform_populate(pdev->dev.of_node,
-				   of_default_bus_match_table,
-				   NULL, &pdev->dev);
+		ret = of_platform_default_populate(pdev->dev.of_node,
+						   NULL, &pdev->dev);
 	if (ret)
 		dev_err(&pdev->dev, "%s fail to create devices.\n",
 			pdev->dev.of_node->full_name);
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 11/14] bus: uniphier-system-bus: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun

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: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/bus/uniphier-system-bus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c
index 834a2ae..f50bd6d 100644
--- a/drivers/bus/uniphier-system-bus.c
+++ b/drivers/bus/uniphier-system-bus.c
@@ -257,8 +257,7 @@ static int uniphier_system_bus_probe(struct platform_device *pdev)
 	uniphier_system_bus_set_reg(priv);
 
 	/* Now, the bus is configured.  Populate platform_devices below it */
-	return of_platform_populate(dev->of_node, of_default_bus_match_table,
-				    NULL, dev);
+	return of_platform_default_populate(dev->of_node, NULL, dev);
 }
 
 static const struct of_device_id uniphier_system_bus_match[] = {
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 11/14] bus: uniphier-system-bus: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

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: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/bus/uniphier-system-bus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c
index 834a2ae..f50bd6d 100644
--- a/drivers/bus/uniphier-system-bus.c
+++ b/drivers/bus/uniphier-system-bus.c
@@ -257,8 +257,7 @@ static int uniphier_system_bus_probe(struct platform_device *pdev)
 	uniphier_system_bus_set_reg(priv);
 
 	/* Now, the bus is configured.  Populate platform_devices below it */
-	return of_platform_populate(dev->of_node, of_default_bus_match_table,
-				    NULL, dev);
+	return of_platform_default_populate(dev->of_node, NULL, dev);
 }
 
 static const struct of_device_id uniphier_system_bus_match[] = {
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 12/14] memory: omap-gpmc: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Roger Quadros,
	Tony Lindgren

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Roger Quadros <rogerq@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/memory/omap-gpmc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 6515dfc..455fc73 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2016,8 +2016,7 @@ no_timings:
 	/* is child a common bus? */
 	if (of_match_node(of_default_bus_match_table, child))
 		/* create children and other common bus children */
-		if (of_platform_populate(child, of_default_bus_match_table,
-					 NULL, &pdev->dev))
+		if (of_platform_default_populate(child, NULL, &pdev->dev))
 			goto err_child_fail;
 
 	return 0;
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 12/14] memory: omap-gpmc: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Roger Quadros <rogerq@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/memory/omap-gpmc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 6515dfc..455fc73 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2016,8 +2016,7 @@ no_timings:
 	/* is child a common bus? */
 	if (of_match_node(of_default_bus_match_table, child))
 		/* create children and other common bus children */
-		if (of_platform_populate(child, of_default_bus_match_table,
-					 NULL, &pdev->dev))
+		if (of_platform_default_populate(child, NULL, &pdev->dev))
 			goto err_child_fail;
 
 	return 0;
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 13/14] of: unittest: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Frank Rowand

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/of/unittest.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 979b6e4..31837c8 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -772,7 +772,7 @@ static void __init of_unittest_platform_populate(void)
 	};
 
 	np = of_find_node_by_path("/testcase-data");
-	of_platform_populate(np, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(np, NULL, NULL);
 
 	/* Test that a missing irq domain returns -EPROBE_DEFER */
 	np = of_find_node_by_path("/testcase-data/testcase-device1");
@@ -1880,8 +1880,7 @@ static void __init of_unittest_overlay(void)
 		goto out;
 	}
 
-	ret = of_platform_populate(bus_np, of_default_bus_match_table,
-			NULL, NULL);
+	ret = of_platform_default_populate(bus_np, NULL, NULL);
 	if (ret != 0) {
 		unittest(0, "could not populate bus @ \"%s\"\n", bus_path);
 		goto out;
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 13/14] of: unittest: use of_platform_default_populate() to populate default bus
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/of/unittest.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 979b6e4..31837c8 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -772,7 +772,7 @@ static void __init of_unittest_platform_populate(void)
 	};
 
 	np = of_find_node_by_path("/testcase-data");
-	of_platform_populate(np, of_default_bus_match_table, NULL, NULL);
+	of_platform_default_populate(np, NULL, NULL);
 
 	/* Test that a missing irq domain returns -EPROBE_DEFER */
 	np = of_find_node_by_path("/testcase-data/testcase-device1");
@@ -1880,8 +1880,7 @@ static void __init of_unittest_overlay(void)
 		goto out;
 	}
 
-	ret = of_platform_populate(bus_np, of_default_bus_match_table,
-			NULL, NULL);
+	ret = of_platform_default_populate(bus_np, NULL, NULL);
 	if (ret != 0) {
 		unittest(0, "could not populate bus @ \"%s\"\n", bus_path);
 		goto out;
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 14/14] Revert "of/platform: export of_default_bus_match_table"
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-03-16  7:35   ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, wangkefeng.wang, guohanjun, Frank Rowand

This reverts commit b80443c2211c7daaabd20fbbe9e7beb3fa3408e0.

After covering to use helper of_platform_default_populate() to populate
the default bus, no need to export of_default_bus_match_table anymore.

Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/of/platform.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 8d103e4..af98343 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -31,7 +31,6 @@ const struct of_device_id of_default_bus_match_table[] = {
 #endif /* CONFIG_ARM_AMBA */
 	{} /* Empty terminated list */
 };
-EXPORT_SYMBOL(of_default_bus_match_table);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 14/14] Revert "of/platform: export of_default_bus_match_table"
@ 2016-03-16  7:35   ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-03-16  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

This reverts commit b80443c2211c7daaabd20fbbe9e7beb3fa3408e0.

After covering to use helper of_platform_default_populate() to populate
the default bus, no need to export of_default_bus_match_table anymore.

Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/of/platform.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 8d103e4..af98343 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -31,7 +31,6 @@ const struct of_device_id of_default_bus_match_table[] = {
 #endif /* CONFIG_ARM_AMBA */
 	{} /* Empty terminated list */
 };
-EXPORT_SYMBOL(of_default_bus_match_table);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 12/14] memory: omap-gpmc: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35   ` Kefeng Wang
@ 2016-03-16 10:38     ` Roger Quadros
  -1 siblings, 0 replies; 50+ messages in thread
From: Roger Quadros @ 2016-03-16 10:38 UTC (permalink / raw)
  To: Kefeng Wang, linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, guohanjun, Tony Lindgren

On 16/03/16 09:35, Kefeng Wang wrote:
> Use helper of_platform_default_populate() in linux/of_platform
> when possible, instead of calling of_platform_populate() with
> the default match table.
> 
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Acked-by: Roger Quadros <rogerq@ti.com>

cheers,
-roger

> ---
>  drivers/memory/omap-gpmc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> index 6515dfc..455fc73 100644
> --- a/drivers/memory/omap-gpmc.c
> +++ b/drivers/memory/omap-gpmc.c
> @@ -2016,8 +2016,7 @@ no_timings:
>  	/* is child a common bus? */
>  	if (of_match_node(of_default_bus_match_table, child))
>  		/* create children and other common bus children */
> -		if (of_platform_populate(child, of_default_bus_match_table,
> -					 NULL, &pdev->dev))
> +		if (of_platform_default_populate(child, NULL, &pdev->dev))
>  			goto err_child_fail;
>  
>  	return 0;
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 12/14] memory: omap-gpmc: use of_platform_default_populate() to populate default bus
@ 2016-03-16 10:38     ` Roger Quadros
  0 siblings, 0 replies; 50+ messages in thread
From: Roger Quadros @ 2016-03-16 10:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 16/03/16 09:35, Kefeng Wang wrote:
> Use helper of_platform_default_populate() in linux/of_platform
> when possible, instead of calling of_platform_populate() with
> the default match table.
> 
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Acked-by: Roger Quadros <rogerq@ti.com>

cheers,
-roger

> ---
>  drivers/memory/omap-gpmc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> index 6515dfc..455fc73 100644
> --- a/drivers/memory/omap-gpmc.c
> +++ b/drivers/memory/omap-gpmc.c
> @@ -2016,8 +2016,7 @@ no_timings:
>  	/* is child a common bus? */
>  	if (of_match_node(of_default_bus_match_table, child))
>  		/* create children and other common bus children */
> -		if (of_platform_populate(child, of_default_bus_match_table,
> -					 NULL, &pdev->dev))
> +		if (of_platform_default_populate(child, NULL, &pdev->dev))
>  			goto err_child_fail;
>  
>  	return 0;
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 01/14] arm: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35   ` Kefeng Wang
@ 2016-03-17  6:19     ` Viresh Kumar
  -1 siblings, 0 replies; 50+ messages in thread
From: Viresh Kumar @ 2016-03-17  6:19 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: linux-arm-kernel, linux-kernel, arnd, shawnguo, catalin.marinas,
	linux, robh+dt, grant.likely, olof, yamada.masahiro, guohanjun,
	Nicolas Ferre, Ray Jui, Lee Jones, Krzysztof Halasa, Kukjin Kim,
	Rob Herring, Santosh Shilimkar, Roland Stigge, Jason Cooper,
	Haojian Zhuang, Heiko Stuebner, Viresh Kumar, Shiraz Hashim,
	Tony Prisk

On 16-03-16, 15:35, Kefeng Wang wrote:
> 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: Shawn Guo <shawnguo@kernel.org>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Acked-by: Krzysztof Halasa <khalasa@piap.pl>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> 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>
> ---
>  arch/arm/mach-spear/spear1310.c          | 2 +-
>  arch/arm/mach-spear/spear1340.c          | 2 +-
>  arch/arm/mach-spear/spear300.c           | 3 +--
>  arch/arm/mach-spear/spear310.c           | 3 +--
>  arch/arm/mach-spear/spear320.c           | 3 +--
>  arch/arm/mach-spear/spear6xx.c           | 3 +--

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 01/14] arm: use of_platform_default_populate() to populate default bus
@ 2016-03-17  6:19     ` Viresh Kumar
  0 siblings, 0 replies; 50+ messages in thread
From: Viresh Kumar @ 2016-03-17  6:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 16-03-16, 15:35, Kefeng Wang wrote:
> 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: Shawn Guo <shawnguo@kernel.org>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Acked-by: Krzysztof Halasa <khalasa@piap.pl>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> 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>
> ---
>  arch/arm/mach-spear/spear1310.c          | 2 +-
>  arch/arm/mach-spear/spear1340.c          | 2 +-
>  arch/arm/mach-spear/spear300.c           | 3 +--
>  arch/arm/mach-spear/spear310.c           | 3 +--
>  arch/arm/mach-spear/spear320.c           | 3 +--
>  arch/arm/mach-spear/spear6xx.c           | 3 +--

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
  2016-03-16  7:35   ` Kefeng Wang
@ 2016-03-17 11:29     ` Vineet Gupta
  -1 siblings, 0 replies; 50+ messages in thread
From: Vineet Gupta @ 2016-03-17 11:29 UTC (permalink / raw)
  To: Kefeng Wang, linux-arm-kernel, linux-kernel
  Cc: arnd, shawnguo, catalin.marinas, linux, robh+dt, grant.likely,
	olof, yamada.masahiro, guohanjun, Vineet Gupta

On Wednesday 16 March 2016 01:03 PM, Kefeng Wang wrote:
> 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: Vineet Gupta <vgupta@synopsys.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Thx Kefeng. I've added this to ARC for-curr for 4.6

> ---
>  arch/arc/kernel/setup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
> index cdc821d..401f51f 100644
> --- a/arch/arc/kernel/setup.c
> +++ b/arch/arc/kernel/setup.c
> @@ -464,7 +464,7 @@ static int __init customize_machine(void)
>  	 * Traverses flattened DeviceTree - registering platform devices
>  	 * (if any) complete with their resources
>  	 */
> -	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +	of_platform_default_populate(NULL, NULL, NULL);

Perhaps too late - but can't of_platform_default_populate just be a static inline
calling of_platform_populate in the header rather than exporting yet another symbol !

-Vineet

>  
>  	if (machine_desc->init_machine)
>  		machine_desc->init_machine();

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
@ 2016-03-17 11:29     ` Vineet Gupta
  0 siblings, 0 replies; 50+ messages in thread
From: Vineet Gupta @ 2016-03-17 11:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 16 March 2016 01:03 PM, Kefeng Wang wrote:
> 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: Vineet Gupta <vgupta@synopsys.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Thx Kefeng. I've added this to ARC for-curr for 4.6

> ---
>  arch/arc/kernel/setup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
> index cdc821d..401f51f 100644
> --- a/arch/arc/kernel/setup.c
> +++ b/arch/arc/kernel/setup.c
> @@ -464,7 +464,7 @@ static int __init customize_machine(void)
>  	 * Traverses flattened DeviceTree - registering platform devices
>  	 * (if any) complete with their resources
>  	 */
> -	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +	of_platform_default_populate(NULL, NULL, NULL);

Perhaps too late - but can't of_platform_default_populate just be a static inline
calling of_platform_populate in the header rather than exporting yet another symbol !

-Vineet

>  
>  	if (machine_desc->init_machine)
>  		machine_desc->init_machine();

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
  2016-03-17 11:29     ` Vineet Gupta
@ 2016-03-17 13:28       ` Rob Herring
  -1 siblings, 0 replies; 50+ messages in thread
From: Rob Herring @ 2016-03-17 13:28 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: Kefeng Wang, linux-arm-kernel, linux-kernel, arnd, shawnguo,
	catalin.marinas, linux, grant.likely, olof, yamada.masahiro,
	guohanjun

On Thu, Mar 17, 2016 at 6:29 AM, Vineet Gupta
<Vineet.Gupta1@synopsys.com> wrote:
> On Wednesday 16 March 2016 01:03 PM, Kefeng Wang wrote:
>> 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: Vineet Gupta <vgupta@synopsys.com>
>> Cc: Vineet Gupta <vgupta@synopsys.com>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>
> Thx Kefeng. I've added this to ARC for-curr for 4.6
>
>> ---
>>  arch/arc/kernel/setup.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
>> index cdc821d..401f51f 100644
>> --- a/arch/arc/kernel/setup.c
>> +++ b/arch/arc/kernel/setup.c
>> @@ -464,7 +464,7 @@ static int __init customize_machine(void)
>>        * Traverses flattened DeviceTree - registering platform devices
>>        * (if any) complete with their resources
>>        */
>> -     of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>> +     of_platform_default_populate(NULL, NULL, NULL);
>
> Perhaps too late - but can't of_platform_default_populate just be a static inline
> calling of_platform_populate in the header rather than exporting yet another symbol !

The idea is to not export the variable of_default_bus_match_table and
export a function instead.

Rob

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
@ 2016-03-17 13:28       ` Rob Herring
  0 siblings, 0 replies; 50+ messages in thread
From: Rob Herring @ 2016-03-17 13:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 17, 2016 at 6:29 AM, Vineet Gupta
<Vineet.Gupta1@synopsys.com> wrote:
> On Wednesday 16 March 2016 01:03 PM, Kefeng Wang wrote:
>> 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: Vineet Gupta <vgupta@synopsys.com>
>> Cc: Vineet Gupta <vgupta@synopsys.com>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>
> Thx Kefeng. I've added this to ARC for-curr for 4.6
>
>> ---
>>  arch/arc/kernel/setup.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
>> index cdc821d..401f51f 100644
>> --- a/arch/arc/kernel/setup.c
>> +++ b/arch/arc/kernel/setup.c
>> @@ -464,7 +464,7 @@ static int __init customize_machine(void)
>>        * Traverses flattened DeviceTree - registering platform devices
>>        * (if any) complete with their resources
>>        */
>> -     of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>> +     of_platform_default_populate(NULL, NULL, NULL);
>
> Perhaps too late - but can't of_platform_default_populate just be a static inline
> calling of_platform_populate in the header rather than exporting yet another symbol !

The idea is to not export the variable of_default_bus_match_table and
export a function instead.

Rob

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
  2016-03-17 13:28       ` Rob Herring
@ 2016-03-17 14:19         ` Vineet Gupta
  -1 siblings, 0 replies; 50+ messages in thread
From: Vineet Gupta @ 2016-03-17 14:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: Kefeng Wang, linux-arm-kernel, linux-kernel, arnd, shawnguo,
	catalin.marinas, linux, grant.likely, olof, yamada.masahiro,
	guohanjun

On Thursday 17 March 2016 06:58 PM, Rob Herring wrote:
>> Perhaps too late - but can't of_platform_default_populate just be a static inline
>> > calling of_platform_populate in the header rather than exporting yet another symbol !
> The idea is to not export the variable of_default_bus_match_table and
> export a function instead.
>
> Rob

Yep I realized this after reading the cover letter of patch which I didn't get !

BTW since I got your attention, could u please take a look at
http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000653.html
and
http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000656.html

-Vineet

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
@ 2016-03-17 14:19         ` Vineet Gupta
  0 siblings, 0 replies; 50+ messages in thread
From: Vineet Gupta @ 2016-03-17 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 17 March 2016 06:58 PM, Rob Herring wrote:
>> Perhaps too late - but can't of_platform_default_populate just be a static inline
>> > calling of_platform_populate in the header rather than exporting yet another symbol !
> The idea is to not export the variable of_default_bus_match_table and
> export a function instead.
>
> Rob

Yep I realized this after reading the cover letter of patch which I didn't get !

BTW since I got your attention, could u please take a look at
http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000653.html
and
http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000656.html

-Vineet

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
  2016-03-17 14:19         ` Vineet Gupta
@ 2016-03-17 14:40           ` Rob Herring
  -1 siblings, 0 replies; 50+ messages in thread
From: Rob Herring @ 2016-03-17 14:40 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: Kefeng Wang, linux-arm-kernel, linux-kernel, arnd, shawnguo,
	catalin.marinas, linux, grant.likely, olof, yamada.masahiro,
	guohanjun

On Thu, Mar 17, 2016 at 9:19 AM, Vineet Gupta
<Vineet.Gupta1@synopsys.com> wrote:
> On Thursday 17 March 2016 06:58 PM, Rob Herring wrote:
>>> Perhaps too late - but can't of_platform_default_populate just be a static inline
>>> > calling of_platform_populate in the header rather than exporting yet another symbol !
>> The idea is to not export the variable of_default_bus_match_table and
>> export a function instead.
>>
>> Rob
>
> Yep I realized this after reading the cover letter of patch which I didn't get !
>
> BTW since I got your attention, could u please take a look at
> http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000653.html
> and
> http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000656.html

If it is in DT patchworks, I'll get to it soon. I'm about 2 weeks
behind between conference and vacation.

Rob

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 04/14] arc: use of_platform_default_populate() to populate default bus
@ 2016-03-17 14:40           ` Rob Herring
  0 siblings, 0 replies; 50+ messages in thread
From: Rob Herring @ 2016-03-17 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 17, 2016 at 9:19 AM, Vineet Gupta
<Vineet.Gupta1@synopsys.com> wrote:
> On Thursday 17 March 2016 06:58 PM, Rob Herring wrote:
>>> Perhaps too late - but can't of_platform_default_populate just be a static inline
>>> > calling of_platform_populate in the header rather than exporting yet another symbol !
>> The idea is to not export the variable of_default_bus_match_table and
>> export a function instead.
>>
>> Rob
>
> Yep I realized this after reading the cover letter of patch which I didn't get !
>
> BTW since I got your attention, could u please take a look at
> http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000653.html
> and
> http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000656.html

If it is in DT patchworks, I'll get to it soon. I'm about 2 weeks
behind between conference and vacation.

Rob

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
  2016-03-16  7:35 ` Kefeng Wang
@ 2016-04-19 21:10   ` Rob Herring
  -1 siblings, 0 replies; 50+ messages in thread
From: Rob Herring @ 2016-04-19 21:10 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann, Shawn Guo,
	Catalin Marinas, Russell King - ARM Linux, Grant Likely,
	Olof Johansson, Masahiro Yamada, Hanjun Guo

On Wed, Mar 16, 2016 at 2:35 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> Use helper of_platform_default_populate() in linux/of_platform
> when possible, instead of calling of_platform_populate() with
> the default match table.
>
> Then it is possible for driver code build as a module, and no
> need to export of_default_bus_match_table anymore.
>
> This patchset is based on Linux 4.5.
>
> Changes since v1:
> - Add ack, test and review
> - Remove v1 patch 14/15, the similar patch has posted and applied,
>   see https://patchwork.kernel.org/patch/8096991/
>
> v1:
> - https://lkml.org/lkml/2016/1/26/1123

I was going to apply this, but I've thought about this some more and
it is a lot of tree wide churn for little gain. Most of the call sites
here I want to get rid of by making of_platform_populate callable
multiple times. The infrastructure is almost there, but I think we
just need something like this:

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 8d103e4..b25e710 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -345,6 +345,9 @@ static int of_platform_bus_create(struct device_node *bus,
                return 0;
        }

+       if (of_node_check_flag(bus, OF_POPULATED_BUS))
+               return 0;
+
        auxdata = of_dev_lookup(lookup, bus);
        if (auxdata) {
                bus_id = auxdata->name;

Then we can call of_platform_populate from the DT core and remove all
the default calls.

Rob

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
@ 2016-04-19 21:10   ` Rob Herring
  0 siblings, 0 replies; 50+ messages in thread
From: Rob Herring @ 2016-04-19 21:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 16, 2016 at 2:35 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> Use helper of_platform_default_populate() in linux/of_platform
> when possible, instead of calling of_platform_populate() with
> the default match table.
>
> Then it is possible for driver code build as a module, and no
> need to export of_default_bus_match_table anymore.
>
> This patchset is based on Linux 4.5.
>
> Changes since v1:
> - Add ack, test and review
> - Remove v1 patch 14/15, the similar patch has posted and applied,
>   see https://patchwork.kernel.org/patch/8096991/
>
> v1:
> - https://lkml.org/lkml/2016/1/26/1123

I was going to apply this, but I've thought about this some more and
it is a lot of tree wide churn for little gain. Most of the call sites
here I want to get rid of by making of_platform_populate callable
multiple times. The infrastructure is almost there, but I think we
just need something like this:

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 8d103e4..b25e710 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -345,6 +345,9 @@ static int of_platform_bus_create(struct device_node *bus,
                return 0;
        }

+       if (of_node_check_flag(bus, OF_POPULATED_BUS))
+               return 0;
+
        auxdata = of_dev_lookup(lookup, bus);
        if (auxdata) {
                bus_id = auxdata->name;

Then we can call of_platform_populate from the DT core and remove all
the default calls.

Rob

^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
  2016-04-19 21:10   ` Rob Herring
@ 2016-04-21  7:55     ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-04-21  7:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann, Shawn Guo,
	Catalin Marinas, Russell King - ARM Linux, Grant Likely,
	Olof Johansson, Masahiro Yamada, Hanjun Guo

Hi Rob,

On 2016/4/20 5:10, Rob Herring wrote:
> On Wed, Mar 16, 2016 at 2:35 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> Use helper of_platform_default_populate() in linux/of_platform
>> when possible, instead of calling of_platform_populate() with
>> the default match table.
>>
>> Then it is possible for driver code build as a module, and no
>> need to export of_default_bus_match_table anymore.
>>
>> This patchset is based on Linux 4.5.
>>
>> Changes since v1:
>> - Add ack, test and review
>> - Remove v1 patch 14/15, the similar patch has posted and applied,
>>   see https://patchwork.kernel.org/patch/8096991/
>>
>> v1:
>> - https://lkml.org/lkml/2016/1/26/1123
> 
> I was going to apply this, but I've thought about this some more and
> it is a lot of tree wide churn for little gain. Most of the call sites
> here I want to get rid of by making of_platform_populate callable
> multiple times. The infrastructure is almost there, but I think we
> just need something like this:
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 8d103e4..b25e710 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -345,6 +345,9 @@ static int of_platform_bus_create(struct device_node *bus,
>                 return 0;
>         }
> 
> +       if (of_node_check_flag(bus, OF_POPULATED_BUS))
> +               return 0;
> +
>         auxdata = of_dev_lookup(lookup, bus);
>         if (auxdata) {
>                 bus_id = auxdata->name;
> 
> Then we can call of_platform_populate from the DT core and remove all
> the default calls.

OK, it seems that we can drop all the of_of_platform_default_populate in arch code
by this changes, will do it.

But replace of_platform_populate() with the default match table by of_platform_default_populate
is a cleanup, and especially for the driver, we can not need export of_default_bus_match_table
after that.

There is a v3 patchset[1], it is based 4.6-rc2 with some updated, should this be merge firstly,
then drop all the default of_platform_populate in arch code, and I think the of_iommu_init() in
arch code could do the same thing.

If not, I will repost the patches with new ways, but still exists the part of unexport
of_default_bus_match_table by helper of_platform_default_populate().

Hope the v3 patchset could be merge in advance, after all, it has been reviewed fully. Thanks a lot.

BRs,
Kefeng


[1] https://lkml.org/lkml/2016/4/5/55

> 
> Rob
> 
> .
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
@ 2016-04-21  7:55     ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-04-21  7:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Rob,

On 2016/4/20 5:10, Rob Herring wrote:
> On Wed, Mar 16, 2016 at 2:35 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> Use helper of_platform_default_populate() in linux/of_platform
>> when possible, instead of calling of_platform_populate() with
>> the default match table.
>>
>> Then it is possible for driver code build as a module, and no
>> need to export of_default_bus_match_table anymore.
>>
>> This patchset is based on Linux 4.5.
>>
>> Changes since v1:
>> - Add ack, test and review
>> - Remove v1 patch 14/15, the similar patch has posted and applied,
>>   see https://patchwork.kernel.org/patch/8096991/
>>
>> v1:
>> - https://lkml.org/lkml/2016/1/26/1123
> 
> I was going to apply this, but I've thought about this some more and
> it is a lot of tree wide churn for little gain. Most of the call sites
> here I want to get rid of by making of_platform_populate callable
> multiple times. The infrastructure is almost there, but I think we
> just need something like this:
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 8d103e4..b25e710 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -345,6 +345,9 @@ static int of_platform_bus_create(struct device_node *bus,
>                 return 0;
>         }
> 
> +       if (of_node_check_flag(bus, OF_POPULATED_BUS))
> +               return 0;
> +
>         auxdata = of_dev_lookup(lookup, bus);
>         if (auxdata) {
>                 bus_id = auxdata->name;
> 
> Then we can call of_platform_populate from the DT core and remove all
> the default calls.

OK, it seems that we can drop all the of_of_platform_default_populate in arch code
by this changes, will do it.

But replace of_platform_populate() with the default match table by of_platform_default_populate
is a cleanup, and especially for the driver, we can not need export of_default_bus_match_table
after that.

There is a v3 patchset[1], it is based 4.6-rc2 with some updated, should this be merge firstly,
then drop all the default of_platform_populate in arch code, and I think the of_iommu_init() in
arch code could do the same thing.

If not, I will repost the patches with new ways, but still exists the part of unexport
of_default_bus_match_table by helper of_platform_default_populate().

Hope the v3 patchset could be merge in advance, after all, it has been reviewed fully. Thanks a lot.

BRs,
Kefeng


[1] https://lkml.org/lkml/2016/4/5/55

> 
> Rob
> 
> .
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
  2016-04-21  7:55     ` Kefeng Wang
@ 2016-04-21 13:10       ` Rob Herring
  -1 siblings, 0 replies; 50+ messages in thread
From: Rob Herring @ 2016-04-21 13:10 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann, Shawn Guo,
	Catalin Marinas, Russell King - ARM Linux, Grant Likely,
	Olof Johansson, Masahiro Yamada, Hanjun Guo

On Thu, Apr 21, 2016 at 2:55 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> Hi Rob,
>
> On 2016/4/20 5:10, Rob Herring wrote:
>> On Wed, Mar 16, 2016 at 2:35 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>> Use helper of_platform_default_populate() in linux/of_platform
>>> when possible, instead of calling of_platform_populate() with
>>> the default match table.
>>>
>>> Then it is possible for driver code build as a module, and no
>>> need to export of_default_bus_match_table anymore.
>>>
>>> This patchset is based on Linux 4.5.
>>>
>>> Changes since v1:
>>> - Add ack, test and review
>>> - Remove v1 patch 14/15, the similar patch has posted and applied,
>>>   see https://patchwork.kernel.org/patch/8096991/
>>>
>>> v1:
>>> - https://lkml.org/lkml/2016/1/26/1123
>>
>> I was going to apply this, but I've thought about this some more and
>> it is a lot of tree wide churn for little gain. Most of the call sites
>> here I want to get rid of by making of_platform_populate callable
>> multiple times. The infrastructure is almost there, but I think we
>> just need something like this:
>>
>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>> index 8d103e4..b25e710 100644
>> --- a/drivers/of/platform.c
>> +++ b/drivers/of/platform.c
>> @@ -345,6 +345,9 @@ static int of_platform_bus_create(struct device_node *bus,
>>                 return 0;
>>         }
>>
>> +       if (of_node_check_flag(bus, OF_POPULATED_BUS))
>> +               return 0;
>> +
>>         auxdata = of_dev_lookup(lookup, bus);
>>         if (auxdata) {
>>                 bus_id = auxdata->name;
>>
>> Then we can call of_platform_populate from the DT core and remove all
>> the default calls.
>
> OK, it seems that we can drop all the of_of_platform_default_populate in arch code
> by this changes, will do it.
>
> But replace of_platform_populate() with the default match table by of_platform_default_populate
> is a cleanup, and especially for the driver, we can not need export of_default_bus_match_table
> after that.
>
> There is a v3 patchset[1], it is based 4.6-rc2 with some updated, should this be merge firstly,
> then drop all the default of_platform_populate in arch code, and I think the of_iommu_init() in
> arch code could do the same thing.
>
> If not, I will repost the patches with new ways, but still exists the part of unexport
> of_default_bus_match_table by helper of_platform_default_populate().
>
> Hope the v3 patchset could be merge in advance, after all, it has been reviewed fully. Thanks a lot.

We'd be touching the same line twice in a bunch of places if we apply
this series first, so it makes more sense to remove all these calls
first and then use of_platform_default_populate where it is still
needed.

Rob

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
@ 2016-04-21 13:10       ` Rob Herring
  0 siblings, 0 replies; 50+ messages in thread
From: Rob Herring @ 2016-04-21 13:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 21, 2016 at 2:55 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> Hi Rob,
>
> On 2016/4/20 5:10, Rob Herring wrote:
>> On Wed, Mar 16, 2016 at 2:35 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>> Use helper of_platform_default_populate() in linux/of_platform
>>> when possible, instead of calling of_platform_populate() with
>>> the default match table.
>>>
>>> Then it is possible for driver code build as a module, and no
>>> need to export of_default_bus_match_table anymore.
>>>
>>> This patchset is based on Linux 4.5.
>>>
>>> Changes since v1:
>>> - Add ack, test and review
>>> - Remove v1 patch 14/15, the similar patch has posted and applied,
>>>   see https://patchwork.kernel.org/patch/8096991/
>>>
>>> v1:
>>> - https://lkml.org/lkml/2016/1/26/1123
>>
>> I was going to apply this, but I've thought about this some more and
>> it is a lot of tree wide churn for little gain. Most of the call sites
>> here I want to get rid of by making of_platform_populate callable
>> multiple times. The infrastructure is almost there, but I think we
>> just need something like this:
>>
>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>> index 8d103e4..b25e710 100644
>> --- a/drivers/of/platform.c
>> +++ b/drivers/of/platform.c
>> @@ -345,6 +345,9 @@ static int of_platform_bus_create(struct device_node *bus,
>>                 return 0;
>>         }
>>
>> +       if (of_node_check_flag(bus, OF_POPULATED_BUS))
>> +               return 0;
>> +
>>         auxdata = of_dev_lookup(lookup, bus);
>>         if (auxdata) {
>>                 bus_id = auxdata->name;
>>
>> Then we can call of_platform_populate from the DT core and remove all
>> the default calls.
>
> OK, it seems that we can drop all the of_of_platform_default_populate in arch code
> by this changes, will do it.
>
> But replace of_platform_populate() with the default match table by of_platform_default_populate
> is a cleanup, and especially for the driver, we can not need export of_default_bus_match_table
> after that.
>
> There is a v3 patchset[1], it is based 4.6-rc2 with some updated, should this be merge firstly,
> then drop all the default of_platform_populate in arch code, and I think the of_iommu_init() in
> arch code could do the same thing.
>
> If not, I will repost the patches with new ways, but still exists the part of unexport
> of_default_bus_match_table by helper of_platform_default_populate().
>
> Hope the v3 patchset could be merge in advance, after all, it has been reviewed fully. Thanks a lot.

We'd be touching the same line twice in a bunch of places if we apply
this series first, so it makes more sense to remove all these calls
first and then use of_platform_default_populate where it is still
needed.

Rob

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
  2016-04-21 13:10       ` Rob Herring
@ 2016-04-22  2:47         ` Kefeng Wang
  -1 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-04-22  2:47 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann, Shawn Guo,
	Catalin Marinas, Russell King - ARM Linux, Grant Likely,
	Olof Johansson, Masahiro Yamada, Hanjun Guo



On 2016/4/21 21:10, Rob Herring wrote:
> On Thu, Apr 21, 2016 at 2:55 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> Hi Rob,
>>
>> On 2016/4/20 5:10, Rob Herring wrote:
>>> On Wed, Mar 16, 2016 at 2:35 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>>> Use helper of_platform_default_populate() in linux/of_platform
>>>> when possible, instead of calling of_platform_populate() with
>>>> the default match table.
>>>>
>>>> Then it is possible for driver code build as a module, and no
>>>> need to export of_default_bus_match_table anymore.
>>>>
>>>> This patchset is based on Linux 4.5.
>>>>
>>>> Changes since v1:
>>>> - Add ack, test and review
>>>> - Remove v1 patch 14/15, the similar patch has posted and applied,
>>>>   see https://patchwork.kernel.org/patch/8096991/
>>>>
>>>> v1:
>>>> - https://lkml.org/lkml/2016/1/26/1123
>>>
>>> I was going to apply this, but I've thought about this some more and
>>> it is a lot of tree wide churn for little gain. Most of the call sites
>>> here I want to get rid of by making of_platform_populate callable
>>> multiple times. The infrastructure is almost there, but I think we
>>> just need something like this:
>>>
>>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>>> index 8d103e4..b25e710 100644
>>> --- a/drivers/of/platform.c
>>> +++ b/drivers/of/platform.c
>>> @@ -345,6 +345,9 @@ static int of_platform_bus_create(struct device_node *bus,
>>>                 return 0;
>>>         }
>>>
>>> +       if (of_node_check_flag(bus, OF_POPULATED_BUS))
>>> +               return 0;
>>> +
>>>         auxdata = of_dev_lookup(lookup, bus);
>>>         if (auxdata) {
>>>                 bus_id = auxdata->name;
>>>
>>> Then we can call of_platform_populate from the DT core and remove all
>>> the default calls.
>>
>> OK, it seems that we can drop all the of_of_platform_default_populate in arch code
>> by this changes, will do it.
>>
>> But replace of_platform_populate() with the default match table by of_platform_default_populate
>> is a cleanup, and especially for the driver, we can not need export of_default_bus_match_table
>> after that.
>>
>> There is a v3 patchset[1], it is based 4.6-rc2 with some updated, should this be merge firstly,
>> then drop all the default of_platform_populate in arch code, and I think the of_iommu_init() in
>> arch code could do the same thing.
>>
>> If not, I will repost the patches with new ways, but still exists the part of unexport
>> of_default_bus_match_table by helper of_platform_default_populate().
>>
>> Hope the v3 patchset could be merge in advance, after all, it has been reviewed fully. Thanks a lot.
> 
> We'd be touching the same line twice in a bunch of places if we apply
> this series first, so it makes more sense to remove all these calls
> first and then use of_platform_default_populate where it is still
> needed.

Agree, will repost them.

BRs,
Kefeng

> 
> Rob
> 
> .
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus
@ 2016-04-22  2:47         ` Kefeng Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Kefeng Wang @ 2016-04-22  2:47 UTC (permalink / raw)
  To: linux-arm-kernel



On 2016/4/21 21:10, Rob Herring wrote:
> On Thu, Apr 21, 2016 at 2:55 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> Hi Rob,
>>
>> On 2016/4/20 5:10, Rob Herring wrote:
>>> On Wed, Mar 16, 2016 at 2:35 AM, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>>> Use helper of_platform_default_populate() in linux/of_platform
>>>> when possible, instead of calling of_platform_populate() with
>>>> the default match table.
>>>>
>>>> Then it is possible for driver code build as a module, and no
>>>> need to export of_default_bus_match_table anymore.
>>>>
>>>> This patchset is based on Linux 4.5.
>>>>
>>>> Changes since v1:
>>>> - Add ack, test and review
>>>> - Remove v1 patch 14/15, the similar patch has posted and applied,
>>>>   see https://patchwork.kernel.org/patch/8096991/
>>>>
>>>> v1:
>>>> - https://lkml.org/lkml/2016/1/26/1123
>>>
>>> I was going to apply this, but I've thought about this some more and
>>> it is a lot of tree wide churn for little gain. Most of the call sites
>>> here I want to get rid of by making of_platform_populate callable
>>> multiple times. The infrastructure is almost there, but I think we
>>> just need something like this:
>>>
>>> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>>> index 8d103e4..b25e710 100644
>>> --- a/drivers/of/platform.c
>>> +++ b/drivers/of/platform.c
>>> @@ -345,6 +345,9 @@ static int of_platform_bus_create(struct device_node *bus,
>>>                 return 0;
>>>         }
>>>
>>> +       if (of_node_check_flag(bus, OF_POPULATED_BUS))
>>> +               return 0;
>>> +
>>>         auxdata = of_dev_lookup(lookup, bus);
>>>         if (auxdata) {
>>>                 bus_id = auxdata->name;
>>>
>>> Then we can call of_platform_populate from the DT core and remove all
>>> the default calls.
>>
>> OK, it seems that we can drop all the of_of_platform_default_populate in arch code
>> by this changes, will do it.
>>
>> But replace of_platform_populate() with the default match table by of_platform_default_populate
>> is a cleanup, and especially for the driver, we can not need export of_default_bus_match_table
>> after that.
>>
>> There is a v3 patchset[1], it is based 4.6-rc2 with some updated, should this be merge firstly,
>> then drop all the default of_platform_populate in arch code, and I think the of_iommu_init() in
>> arch code could do the same thing.
>>
>> If not, I will repost the patches with new ways, but still exists the part of unexport
>> of_default_bus_match_table by helper of_platform_default_populate().
>>
>> Hope the v3 patchset could be merge in advance, after all, it has been reviewed fully. Thanks a lot.
> 
> We'd be touching the same line twice in a bunch of places if we apply
> this series first, so it makes more sense to remove all these calls
> first and then use of_platform_default_populate where it is still
> needed.

Agree, will repost them.

BRs,
Kefeng

> 
> Rob
> 
> .
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2016-04-22  2:48 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-16  7:35 [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus Kefeng Wang
2016-03-16  7:35 ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 01/14] arm: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-17  6:19   ` Viresh Kumar
2016-03-17  6:19     ` Viresh Kumar
2016-03-16  7:35 ` [PATCH v2 all 02/14] arm64: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 03/14] mips: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 04/14] arc: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-17 11:29   ` Vineet Gupta
2016-03-17 11:29     ` Vineet Gupta
2016-03-17 13:28     ` Rob Herring
2016-03-17 13:28       ` Rob Herring
2016-03-17 14:19       ` Vineet Gupta
2016-03-17 14:19         ` Vineet Gupta
2016-03-17 14:40         ` Rob Herring
2016-03-17 14:40           ` Rob Herring
2016-03-16  7:35 ` [PATCH v2 all 05/14] c6x: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 06/14] metag: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 07/14] cris: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 08/14] nios2: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 09/14] xtensa: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 10/14] bus: imx-weim: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 11/14] bus: uniphier-system-bus: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 12/14] memory: omap-gpmc: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16 10:38   ` Roger Quadros
2016-03-16 10:38     ` Roger Quadros
2016-03-16  7:35 ` [PATCH v2 all 13/14] of: unittest: " Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-03-16  7:35 ` [PATCH v2 all 14/14] Revert "of/platform: export of_default_bus_match_table" Kefeng Wang
2016-03-16  7:35   ` Kefeng Wang
2016-04-19 21:10 ` [PATCH v2 all 00/14] use of_platform_default_populate() to populate default bus Rob Herring
2016-04-19 21:10   ` Rob Herring
2016-04-21  7:55   ` Kefeng Wang
2016-04-21  7:55     ` Kefeng Wang
2016-04-21 13:10     ` Rob Herring
2016-04-21 13:10       ` Rob Herring
2016-04-22  2:47       ` Kefeng Wang
2016-04-22  2:47         ` Kefeng Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.