[U-Boot-Users] [PATCH 8/10] net: Conditional COBJS inclusion of SMC modules

Shinya Kuribayashi skuribay at ruby.dti.ne.jp
Sat Jun 7 18:12:45 CEST 2008


net: Conditional COBJS inclusion of SMC modules

From: Shinya Kuribayashi <skuribay at ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay at ruby.dti.ne.jp>
---

 drivers/net/Makefile   |    6 +++---
 drivers/net/lan91c96.c |    9 ---------
 drivers/net/smc91111.c |    3 ---
 drivers/net/smc911x.c  |    5 -----
 4 files changed, 3 insertions(+), 20 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 3370aa4..dc68f3e 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -38,7 +38,7 @@ COBJS-y += fsl_mcdmafec.o
 COBJS-$(CONFIG_GRETH) += greth.o
 COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
 COBJS-y += ks8695eth.o
-COBJS-y += lan91c96.o
+COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
 COBJS-y += macb.o
 COBJS-y += mcffec.o
 COBJS-$(CONFIG_NATSEMI) += natsemi.o
@@ -57,8 +57,8 @@ COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
 COBJS-$(CONFIG_RTL8139) += rtl8139.o
 COBJS-$(CONFIG_RTL8169) += rtl8169.o
 COBJS-y += s3c4510b_eth.o
-COBJS-y += smc91111.o
-COBJS-y += smc911x.o
+COBJS-$(CONFIG_DRIVER_SMC91111) += smc91111.o
+COBJS-$(CONFIG_DRIVER_SMC911X) += smc911x.o
 COBJS-$(CONFIG_TIGON3) += tigon3.o bcm570x_autoneg.o 5701rls.o
 COBJS-$(CONFIG_TSEC_ENET) += tsec.o
 COBJS-y += tsi108_eth.o
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 51cfb7e..c23a400 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -63,10 +63,6 @@
 #include "lan91c96.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_LAN91C96
-
-#if defined(CONFIG_CMD_NET)
-
 /*------------------------------------------------------------------------
  *
  * Configuration options, for the experienced user to change.
@@ -865,9 +861,6 @@ static int smc_hw_init ()
 }
 #endif /* 0 */
 
-#endif /* CONFIG_CMD_NET */
-
-
 /* smc_get_ethaddr (bd_t * bd)
  *
  * This checks both the environment and the ROM for an ethernet address. If
@@ -963,5 +956,3 @@ int get_rom_mac (unsigned char *v_rom_mac)
 	return (1);
 #endif
 }
-
-#endif /* CONFIG_DRIVER_LAN91C96 */
diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 8061f12..e8b235b 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -65,8 +65,6 @@
 #include "smc91111.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_SMC91111
-
 /* Use power-down feature of the chip */
 #define POWER_DOWN	0
 
@@ -1620,4 +1618,3 @@ int get_rom_mac (uchar *v_rom_mac)
 	return (valid_mac ? 1 : 0);
 #endif
 }
-#endif /* CONFIG_DRIVER_SMC91111 */
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 5302cb5..8e141d4 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -23,9 +23,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_DRIVER_SMC911X
-
 #include <command.h>
 #include <net.h>
 #include <miiphy.h>
@@ -682,5 +679,3 @@ int eth_rx(void)
 
 	return 0;
 }
-
-#endif				/* CONFIG_DRIVER_SMC911X */




More information about the U-Boot mailing list