This function finds a device by its driver_info index. With of-platdata-inst we do not use driver_info, but instead instantiate udevice records at build-time.
However the semantics of using the function are the same in each case: the caller provides an index and gets back a device. So rename the function to device_get_by_ofplat_idx(), so that it can be used for both situations. The caller does not really need to worry about the details. Signed-off-by: Simon Glass <s...@chromium.org> --- (no changes since v1) drivers/clk/clk-uclass.c | 2 +- drivers/core/device.c | 13 ++++++++++--- drivers/misc/irq-uclass.c | 2 +- drivers/mmc/fsl_esdhc_imx.c | 3 +-- include/dm/device.h | 16 +++++++++++----- test/dm/of_platdata.c | 15 +++++++-------- 6 files changed, 31 insertions(+), 20 deletions(-) Applied to u-boot-dm/next, thanks!