提交 4bdb49a7 编写于 作者: T Tom Rini

dm: blk: Fix warning on !CONFIG_BLK

When we don't have CONFIG_BLK defined we don't have a forward
declaration of struct udevice, and thus get a warning about it on
blk_get_from_parent(), which we only have when CONFIG_BLK is set.  Move
the declaration of blk_get_from_parent() to be with the other CONFIG_BLK
parts.

Fixes 9f103b9c ("dm: blk: Add a way to obtain a block device from ...")
Signed-off-by: NTom Rini <trini@konsulko.com>
上级 d2e1ee68
......@@ -377,6 +377,13 @@ int blk_find_max_devnum(enum if_type if_type);
*/
int blk_select_hwpart(struct udevice *dev, int hwpart);
/**
* blk_get_from_parent() - obtain a block device by looking up its parent
*
* All devices with
*/
int blk_get_from_parent(struct udevice *parent, struct udevice **devp);
#else
#include <errno.h>
/*
......@@ -616,11 +623,4 @@ ulong blk_write_devnum(enum if_type if_type, int devnum, lbaint_t start,
*/
int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart);
/**
* blk_get_from_parent() - obtain a block device by looking up its parent
*
* All devices with
*/
int blk_get_from_parent(struct udevice *parent, struct udevice **devp);
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册