bootstd: Export bootdev_get_from_blk()
authorSimon Glass <sjg@chromium.org>
Fri, 15 Nov 2024 23:19:24 +0000 (16:19 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 15 Jan 2025 14:48:43 +0000 (08:48 -0600)
Export this function so it can be used from other files.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/bootdev-uclass.c
include/bootdev.h

index a4e1d79..65a3b89 100644 (file)
@@ -319,7 +319,7 @@ int bootdev_get_sibling_blk(struct udevice *dev, struct udevice **blkp)
        return 0;
 }
 
-static int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp)
+int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp)
 {
        struct udevice *parent = dev_get_parent(blk);
        struct udevice *bootdev;
index 991b622..12c90c4 100644 (file)
@@ -401,6 +401,15 @@ static int bootdev_setup_for_sibling_blk(struct udevice *blk,
  */
 int bootdev_get_sibling_blk(struct udevice *dev, struct udevice **blkp);
 
+/**
+ * bootdev_get_from_blk() - Get the bootdev given a block device
+ *
+ * @blk: Block device to check
+ * @bootdebp: Returns the bootdev found, if any
+ * Return 0 if OK, -ve on error
+ */
+int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp);
+
 /**
  * bootdev_unbind_dev() - Unbind a bootdev device
  *