This function now finds its block-device child by looking for a child device of the correct uclass (UCLASS_BLK). It cannot produce a device of any other type, so drop the superfluous check.
Provide a version which does not probe the device, since that is often needed when setting up the device's platdata. Also fix up the function's comment. Signed-off-by: Simon Glass <s...@chromium.org> --- drivers/block/blk-uclass.c | 26 +++++++++++++++----------- include/blk.h | 28 +++++++++++++++++++++++++++- test/dm/blk.c | 2 +- 3 files changed, 43 insertions(+), 13 deletions(-) Applied to u-boot-dm, thanks!