summaryrefslogtreecommitdiff
path: root/include/blk.h
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-10-15 02:21:09 -0700
committerSimon Glass <sjg@chromium.org>2018-11-14 09:16:27 -0800
commitc879eeb7aa95d753d4d9e39f43004943ed9d93b7 (patch)
tree585f6c8f0d60b0cacd31293686b4e22496dce24a /include/blk.h
parentc515ee5c51618883df64ab7326fbee8911b99a97 (diff)
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 <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/blk.h')
-rw-r--r--include/blk.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/blk.h b/include/blk.h
index c243179ebb..5e94f0e096 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -379,6 +379,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
*
* Select a hardware partition if the device supports it (typically MMC does)