diff options
author | Tom Rini <trini@konsulko.com> | 2017-06-10 10:01:05 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-06-10 10:01:05 -0400 |
commit | 4bdb49a7487d1c46c04e3da3f1f370cde1566aea (patch) | |
tree | 97c3025f40453c9c96abbaf8a1e66db9947d1894 | |
parent | d2e1ee686ab16c022d1a3049a35b4ce89a25d34e (diff) | |
download | u-boot-4bdb49a7487d1c46c04e3da3f1f370cde1566aea.zip u-boot-4bdb49a7487d1c46c04e3da3f1f370cde1566aea.tar.gz u-boot-4bdb49a7487d1c46c04e3da3f1f370cde1566aea.tar.bz2 |
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 9f103b9cb5f8 ("dm: blk: Add a way to obtain a block device from ...")
Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r-- | include/blk.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/blk.h b/include/blk.h index 4d60987..ef29a07 100644 --- a/include/blk.h +++ b/include/blk.h @@ -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 |