[U-Boot] [PATCH 3/3] cmd: scsi: compile out scsi_init when CONFIG_DISK is defined

Mugunthan V N mugunthanvnm at ti.com
Thu Mar 3 06:06:29 CET 2016


When CONFIG_DISK is defined, disk_uclass takes care of scsi_init,
so compile out scsi_init when CONFIG_DISK is defined.

Signed-off-by: Mugunthan V N <mugunthanvnm at ti.com>
---
 cmd/scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmd/scsi.c b/cmd/scsi.c
index bc7d1b6..e2ae046 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -181,7 +181,8 @@ int scsi_get_disk_count(void)
 	return scsi_max_devs;
 }
 
-#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
+#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT) &&	\
+		!defined(CONFIG_DISK)
 void scsi_init(void)
 {
 	int busdevfunc = -1;
-- 
2.7.2.333.g70bd996



More information about the U-Boot mailing list