Fix a nested check for BOOTSTD in the bootdev.h header file. Signed-off-by: Simon Glass <s...@chromium.org> ---
include/bootdev.h | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/include/bootdev.h b/include/bootdev.h index 12c90c4ec1b..9ab95cebc12 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -368,7 +368,6 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp); */ int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name); -#if CONFIG_IS_ENABLED(BOOTSTD) /** * bootdev_setup_for_sibling_blk() - Bind a new bootdev device for a blk device * @@ -383,32 +382,6 @@ int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name); * Return: 0 if OK, -ve on error */ int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name); -#else -static int bootdev_setup_for_sibling_blk(struct udevice *blk, - const char *drv_name) -{ - return 0; -} -#endif - -/** - * bootdev_get_sibling_blk() - Locate the block device for a bootdev - * - * @dev: bootdev to check - * @blkp: returns associated block device - * Return: 0 if OK, -EINVAL if @dev is not a bootdev device, other -ve on other - * error - */ -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 @@ -421,6 +394,7 @@ int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp); * Return: 0 if OK, -ve on error */ int bootdev_unbind_dev(struct udevice *parent); + #else static inline int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name) @@ -440,4 +414,23 @@ static inline int bootdev_unbind_dev(struct udevice *parent) } #endif +/** + * bootdev_get_sibling_blk() - Locate the block device for a bootdev + * + * @dev: bootdev to check + * @blkp: returns associated block device + * Return: 0 if OK, -EINVAL if @dev is not a bootdev device, other -ve on other + * error + */ +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); + #endif -- 2.43.0