[U-Boot] [PATCH v2 2/4] block: ide: Fix build error when CONFIG_BLK is on

Bin Meng bmeng.cn at gmail.com
Mon Jul 31 02:24:00 UTC 2017


Add missing #ifndef CONFIG_BLK to wrap dev_desc->block_read.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
---

Changes in v2: None

 drivers/block/ide.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 308ad73..edcf87b 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -469,7 +469,9 @@ static void atapi_inquiry(struct blk_desc *dev_desc)
 
 	device = dev_desc->devnum;
 	dev_desc->type = DEV_TYPE_UNKNOWN;	/* not yet valid */
+#ifndef CONFIG_BLK
 	dev_desc->block_read = atapi_read;
+#endif
 
 	memset(ccb, 0, sizeof(ccb));
 	memset(iobuf, 0, sizeof(iobuf));
-- 
2.9.2



More information about the U-Boot mailing list