[U-Boot-Users] [PATCH 5/10] net: Conditional COBJS inclusion of National Semiconductor modules

Shinya Kuribayashi
2008-06-07T16:08:46Z

net: Conditional COBJS inclusion of National Semiconductor modules

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

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

drivers/net/Makefile | 4 ++--
drivers/net/natsemi.c | 5 -----
drivers/net/ns8382x.c | 5 -----
3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 35c1490..57c31cb 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -41,7 +41,7 @@ COBJS-y += ks8695eth.o
COBJS-y += lan91c96.o
COBJS-y += macb.o
COBJS-y += mcffec.o
-COBJS-y += natsemi.o
+COBJS-$(CONFIG_NATSEMI) += natsemi.o
ifeq ($(CONFIG_DRIVER_NE2000),y)
COBJS-y += ne2000.o
COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
@@ -49,7 +49,7 @@ endif
COBJS-y += netarm_eth.o
COBJS-y += netconsole.o
COBJS-y += ns7520_eth.o
-COBJS-y += ns8382x.o
+COBJS-$(CONFIG_NS8382X) += ns8382x.o
COBJS-y += ns9750_eth.o
COBJS-y += pcnet.o
COBJS-y += plb2800_eth.o
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index a523959..4aee048 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -56,9 +56,6 @@
#include <asm/io.h>
#include <pci.h>

-#if defined(CONFIG_CMD_NET) \
- && defined(CONFIG_NET_MULTI) && defined(CONFIG_NATSEMI)
-
/* defines */
#define EEPROM_SIZE 0xb /*12 16-bit chunks, or 24 bytes*/

@@ -878,5 +875,3 @@ natsemi_disable(struct eth_device *dev)
/* Restore PME enable bit */
OUTL(dev, SavedClkRun, ClkRun);
}
-
-#endif
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index c807dd4..0b9a3ae 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -56,9 +56,6 @@
#include <asm/io.h>
#include <pci.h>

-#if defined(CONFIG_CMD_NET) \
- && defined(CONFIG_NET_MULTI) && defined(CONFIG_NS8382X)
-
/* defines */
#define DSIZE 0x00000FFF
#define ETH_ALEN 6
@@ -859,5 +856,3 @@ ns8382x_disable(struct eth_device *dev)
/* Restore PME enable bit */
OUTL(dev, SavedClkRun, ClkRun);
}
-
-#endif