mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
dm: blk: Add a way to obtain a block device from its parent
Many devices support a child block device (e.g. MMC, USB). Add a convenient way to get this device given the parent device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:

committed by
Jaehoon Chung

parent
fc69d47262
commit
9f103b9cb5
@ -616,4 +616,11 @@ ulong blk_write_devnum(enum if_type if_type, int devnum, lbaint_t start,
|
||||
*/
|
||||
int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart);
|
||||
|
||||
/**
|
||||
* blk_get_from_parent() - obtain a block device by looking up its parent
|
||||
*
|
||||
* All devices with
|
||||
*/
|
||||
int blk_get_from_parent(struct udevice *parent, struct udevice **devp);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user