[PATCH 12/17] dm: blk: Tidy up obtaining a block device from its parent

Simon Glass sjg at chromium.org
Sat Nov 5 20:55:38 CET 2022


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 <sjg at 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!


More information about the U-Boot mailing list