
This function is only used in one place. It is better to jsut use it internally since there is a simpler replacement for use outside the driver-model core code.
Signed-off-by: Simon Glass sjg@chromium.org ---
drivers/core/root.c | 17 +++++++++++++++-- drivers/gpio/atmel_pio4.c | 3 +-- include/dm/root.h | 16 ---------------- 3 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/drivers/core/root.c b/drivers/core/root.c index 175fd3fb252..cd09c55d9d2 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -196,8 +196,21 @@ int dm_scan_platdata(bool pre_reloc_only) }
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) -int dm_scan_fdt_node(struct udevice *parent, const void *blob, int offset, - bool pre_reloc_only) +/** + * dm_scan_fdt_node() - Scan the device tree and bind drivers for a node + * + * This scans the subnodes of a device tree node and and creates a driver + * for each one. + * + * @parent: Parent device for the devices that will be created + * @blob: Pointer to device tree blob + * @offset: Offset of node to scan + * @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC + * flag. If false bind all drivers. + * @return 0 if OK, -ve on error + */ +static int dm_scan_fdt_node(struct udevice *parent, const void *blob, + int offset, bool pre_reloc_only) { int ret = 0, err;
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index 81c30475514..1409b575064 100644 --- a/drivers/gpio/atmel_pio4.c +++ b/drivers/gpio/atmel_pio4.c @@ -10,7 +10,6 @@ #include <clk.h> #include <dm.h> #include <fdtdec.h> -#include <dm/root.h> #include <asm/arch/hardware.h> #include <asm/gpio.h> #include <mach/gpio.h> @@ -276,7 +275,7 @@ static const struct dm_gpio_ops atmel_pio4_ops = {
static int atmel_pio4_bind(struct udevice *dev) { - return dm_scan_fdt_node(dev, gd->fdt_blob, dev_of_offset(dev), false); + return dm_scan_fdt_dev(dev); }
static int atmel_pio4_probe(struct udevice *dev) diff --git a/include/dm/root.h b/include/dm/root.h index 3cf730dcee1..9f8904ff68c 100644 --- a/include/dm/root.h +++ b/include/dm/root.h @@ -56,22 +56,6 @@ int dm_scan_platdata(bool pre_reloc_only); int dm_scan_fdt(const void *blob, bool pre_reloc_only);
/** - * dm_scan_fdt_node() - Scan the device tree and bind drivers for a node - * - * This scans the subnodes of a device tree node and and creates a driver - * for each one. - * - * @parent: Parent device for the devices that will be created - * @blob: Pointer to device tree blob - * @offset: Offset of node to scan - * @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC - * flag. If false bind all drivers. - * @return 0 if OK, -ve on error - */ -int dm_scan_fdt_node(struct udevice *parent, const void *blob, int offset, - bool pre_reloc_only); - -/** * dm_scan_other() - Scan for other devices * * Some devices may not be visible to Driver Model. This weak function can