[U-Boot-Users] [PATCH 07/11] block: Clean drivers/block/Makefile

monstr at seznam.cz monstr at seznam.cz
Mon Jul 14 19:45:41 CEST 2008


From: Michal Simek <monstr at monstr.eu>


Signed-off-by: Michal Simek <monstr at monstr.eu>
---
 drivers/block/Makefile    |   10 +++++-----
 drivers/block/ahci.c      |    3 ---
 drivers/block/ata_piix.c  |    4 ----
 drivers/block/sil680.c    |    4 +---
 drivers/block/sym53c8xx.c |    5 -----
 drivers/block/systemace.c |    3 ---
 6 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index a09cd2a..95db69c 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -25,14 +25,14 @@ include $(TOPDIR)/config.mk
 
 LIB	:= $(obj)libblock.a
 
-COBJS-y += ahci.o
-COBJS-y += ata_piix.o
+COBJS-$(CONFIG_SCSI_AHCI) += ahci.o
+COBJS-$(CFG_ATA_PIIX) += ata_piix.o
 COBJS-$(CONFIG_FSL_SATA) += fsl_sata.o
 COBJS-$(CONFIG_LIBATA) += libata.o
 COBJS-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
-COBJS-y += sil680.o
-COBJS-y += sym53c8xx.o
-COBJS-y += systemace.o
+COBJS-$(CFG_IDE_SIL680) += sil680.o
+COBJS-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o
+COBJS-$(CONFIG_SYSTEMACE) += systemace.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 3d82c62..52fd108 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -26,8 +26,6 @@
  */
 #include <common.h>
 
-#ifdef CONFIG_SCSI_AHCI
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
@@ -700,4 +698,3 @@ void scsi_print_error(ccb * pccb)
 {
 	/*The ahci error info can be read in the ahci driver*/
 }
-#endif
diff --git a/drivers/block/ata_piix.c b/drivers/block/ata_piix.c
index 441a4dc..4c26b36 100644
--- a/drivers/block/ata_piix.c
+++ b/drivers/block/ata_piix.c
@@ -35,8 +35,6 @@
 #include <ide.h>
 #include <ata.h>
 
-#ifdef CFG_ATA_PIIX		/*ata_piix driver */
-
 extern block_dev_desc_t sata_dev_desc[CFG_SATA_MAX_DEVICE];
 extern int curr_device;
 
@@ -756,5 +754,3 @@ int scan_sata(int dev)
 {
 	return 0;
 }
-
-#endif
diff --git a/drivers/block/sil680.c b/drivers/block/sil680.c
index a6143df..3535f20 100644
--- a/drivers/block/sil680.c
+++ b/drivers/block/sil680.c
@@ -54,7 +54,7 @@
  */
 
 #include <common.h>
-#if defined(CFG_IDE_SIL680)
+
 #include <ata.h>
 #include <ide.h>
 #include <pci.h>
@@ -106,5 +106,3 @@ int ide_preinit (void)
 void ide_set_reset (int flag) {
 	return;
 }
-
-#endif /* CFG_IDE_SIL680 */
diff --git a/drivers/block/sym53c8xx.c b/drivers/block/sym53c8xx.c
index 87b63b7..9291b60 100644
--- a/drivers/block/sym53c8xx.c
+++ b/drivers/block/sym53c8xx.c
@@ -35,8 +35,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_SCSI_SYM53C8XX
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
@@ -870,6 +868,3 @@ void scsi_chip_init(void)
 #endif
 }
 #endif
-
-
-#endif /* CONFIG_SCSI_SYM53C8XX */
diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c
index 7d82c27..dfaab52 100644
--- a/drivers/block/systemace.c
+++ b/drivers/block/systemace.c
@@ -44,8 +44,6 @@
 #include <part.h>
 #include <asm/io.h>
 
-#ifdef CONFIG_SYSTEMACE
-
 /*
  * The ace_readw and writew functions read/write 16bit words, but the
  * offset value is the BYTE offset as most used in the Xilinx
@@ -255,4 +253,3 @@ static unsigned long systemace_read(int dev, unsigned long start,
 
 	return blkcnt;
 }
-#endif /* CONFIG_SYSTEMACE */
-- 
1.5.4.GIT





More information about the U-Boot mailing list