From 2e3f1ff63f50f36e74d46f939823241856ebf1bd Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 5 Jul 2016 17:10:09 -0600 Subject: dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev() This new function is more convenient for callers, and handles pre-relocation situations automatically. Signed-off-by: Simon Glass --- arch/x86/lib/lpc-uclass.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/x86/lib') diff --git a/arch/x86/lib/lpc-uclass.c b/arch/x86/lib/lpc-uclass.c index c6e8f73d22..b8254ff48c 100644 --- a/arch/x86/lib/lpc-uclass.c +++ b/arch/x86/lib/lpc-uclass.c @@ -7,7 +7,6 @@ #include #include -#include DECLARE_GLOBAL_DATA_PTR; @@ -19,8 +18,7 @@ static int lpc_uclass_post_bind(struct udevice *bus) * Before relocation, only bind devices marked for pre-relocation * use. */ - return dm_scan_fdt_node(bus, gd->fdt_blob, bus->of_offset, - gd->flags & GD_FLG_RELOC ? false : true); + return dm_scan_fdt_dev(bus); } UCLASS_DRIVER(lpc) = { -- cgit From 911954859d6dece49c3e4835faea004cfe392506 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 5 Jul 2016 17:10:10 -0600 Subject: dm: Use dm_scan_fdt_dev() directly where possible Quite a few places have a bind() method which just calls dm_scan_fdt_dev(). We may as well call dm_scan_fdt_dev() directly. Update the code to do this. Signed-off-by: Simon Glass --- arch/x86/lib/lpc-uclass.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'arch/x86/lib') diff --git a/arch/x86/lib/lpc-uclass.c b/arch/x86/lib/lpc-uclass.c index b8254ff48c..eb033e6b3f 100644 --- a/arch/x86/lib/lpc-uclass.c +++ b/arch/x86/lib/lpc-uclass.c @@ -10,19 +10,8 @@ DECLARE_GLOBAL_DATA_PTR; -static int lpc_uclass_post_bind(struct udevice *bus) -{ - /* - * Scan the device tree for devices - * - * Before relocation, only bind devices marked for pre-relocation - * use. - */ - return dm_scan_fdt_dev(bus); -} - UCLASS_DRIVER(lpc) = { .id = UCLASS_LPC, .name = "lpc", - .post_bind = lpc_uclass_post_bind, + .post_bind = dm_scan_fdt_dev, }; -- cgit