[U-Boot-Users] [PATCH 6/10] net: Conditional COBJS inclusion of NET+ARM modules

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


net: Conditional COBJS inclusion of NET+ARM 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/netarm_eth.c |    4 ----
 drivers/net/ns7520_eth.c |    5 -----
 drivers/net/ns9750_eth.c |    4 ----
 4 files changed, 3 insertions(+), 16 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 57c31cb..70a6dde 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -46,11 +46,11 @@ ifeq ($(CONFIG_DRIVER_NE2000),y)
 COBJS-y += ne2000.o
 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
 endif
-COBJS-y += netarm_eth.o
+COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.o
 COBJS-y += netconsole.o
-COBJS-y += ns7520_eth.o
+COBJS-$(CONFIG_DRIVER_NS7520_ETHERNET) += ns7520_eth.o
 COBJS-$(CONFIG_NS8382X) += ns8382x.o
-COBJS-y += ns9750_eth.o
+COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o
 COBJS-y += pcnet.o
 COBJS-y += plb2800_eth.o
 COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
diff --git a/drivers/net/netarm_eth.c b/drivers/net/netarm_eth.c
index ecf45dc..6b635bb 100644
--- a/drivers/net/netarm_eth.c
+++ b/drivers/net/netarm_eth.c
@@ -22,8 +22,6 @@
 
 
 #include <common.h>
-
-#ifdef CONFIG_DRIVER_NETARMETH
 #include <command.h>
 #include <net.h>
 #include "netarm_eth.h"
@@ -354,5 +352,3 @@ extern int eth_send (volatile void *packet, int length)
 }
 
 #endif /* CONFIG_CMD_NET */
-
-#endif /* CONFIG_DRIVER_NETARMETH */
diff --git a/drivers/net/ns7520_eth.c b/drivers/net/ns7520_eth.c
index a5a20df..37411df 100644
--- a/drivers/net/ns7520_eth.c
+++ b/drivers/net/ns7520_eth.c
@@ -15,8 +15,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
-
 #include <net.h>		/* NetSendPacket */
 #include <asm/arch/netarm_registers.h>
 #include <asm/arch/netarm_dma_module.h>
@@ -846,14 +844,11 @@ extern int ns7520_miiphy_write(char *devname, unsigned char const addr,
 	return (ret);
 }
 #endif				/* defined(CONFIG_MII) */
-#endif				/* CONFIG_DRIVER_NS7520_ETHERNET */
 
 int ns7520_miiphy_initialize(bd_t *bis)
 {
-#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
 #if defined(CONFIG_MII)
 	miiphy_register("ns7520phy", ns7520_miiphy_read, ns7520_miiphy_write);
 #endif
-#endif
 	return 0;
 }
diff --git a/drivers/net/ns9750_eth.c b/drivers/net/ns9750_eth.c
index 067ff8e..0559710 100644
--- a/drivers/net/ns9750_eth.c
+++ b/drivers/net/ns9750_eth.c
@@ -37,8 +37,6 @@
 
 #include "ns9750_eth.h"		/* for Ethernet and PHY */
 
-#ifdef CONFIG_DRIVER_NS9750_ETHERNET
-
 /* some definition to make transistion to linux easier */
 
 #define NS9750_DRIVER_NAME	"eth"
@@ -793,5 +791,3 @@ static unsigned int ns9750_mii_poll_busy (void)
 
 	return unTimeout;
 }
-
-#endif /* CONFIG_DRIVER_NS9750_ETHERNET */




More information about the U-Boot mailing list