mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
dm: blk: Rename get_desc() and make it externally visible
get_desc() can be useful outside blk-uclass.c. Let's change it to an API and make it externally visible. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -515,6 +515,18 @@ const char *blk_get_devtype(struct udevice *dev);
|
||||
*/
|
||||
struct blk_desc *blk_get_by_device(struct udevice *dev);
|
||||
|
||||
/**
|
||||
* blk_get_desc() - Get the block device descriptor for the given device number
|
||||
*
|
||||
* @uclass_id: Interface type
|
||||
* @devnum: Device number (0 = first)
|
||||
* @descp: Returns block device descriptor on success
|
||||
* Return: 0 on success, -ENODEV if there is no such device and no device
|
||||
* with a higher device number, -ENOENT if there is no such device but there
|
||||
* is one with a higher number, or other -ve on other error.
|
||||
*/
|
||||
int blk_get_desc(enum uclass_id uclass_id, int devnum, struct blk_desc **descp);
|
||||
|
||||
#else
|
||||
#include <errno.h>
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user