mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
block: Add a function to find block device descriptor
Add a function to find the block device descriptor of the parent device. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> [trini: Move function declaration to avoid warning] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
14dfc6482a
commit
bc53d2637e
2 changed files with 32 additions and 0 deletions
|
@ -406,6 +406,15 @@ int blk_select_hwpart(struct udevice *dev, int hwpart);
|
|||
*/
|
||||
int blk_get_from_parent(struct udevice *parent, struct udevice **devp);
|
||||
|
||||
/**
|
||||
* blk_get_by_device() - Get the block device descriptor for the given device
|
||||
* @dev: Instance of a storage device
|
||||
*
|
||||
* Return: With block device descriptor on success , NULL if there is no such
|
||||
* block device.
|
||||
*/
|
||||
struct blk_desc *blk_get_by_device(struct udevice *dev);
|
||||
|
||||
#else
|
||||
#include <errno.h>
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue