From c879eeb7aa95d753d4d9e39f43004943ed9d93b7 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Mon, 15 Oct 2018 02:21:09 -0700 Subject: blk: Make blk_next_free_devnum() public blk_next_free_devnum() can be helpful in some cases. Make it a public API. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- include/blk.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/blk.h') diff --git a/include/blk.h b/include/blk.h index c243179ebbe..5e94f0e096b 100644 --- a/include/blk.h +++ b/include/blk.h @@ -378,6 +378,17 @@ int blk_unbind_all(int if_type); */ int blk_find_max_devnum(enum if_type if_type); +/** + * blk_next_free_devnum() - get the next device number for an interface type + * + * Finds the next number that is safe to use for a newly allocated device for + * an interface type @if_type. + * + * @if_type: Interface type to scan + * @return next device number safe to use, or -ve on error + */ +int blk_next_free_devnum(enum if_type if_type); + /** * blk_select_hwpart() - select a hardware partition * -- cgit v1.2.3