From 8379f42bc745eb9e4ca551a30fd2d0a63f740d75 Mon Sep 17 00:00:00 2001 From: Ben Warren Date: Sat, 12 Jul 2008 00:08:45 -0700 Subject: [PATCH] Moved conditional compilation to Makefile for SK98 Ethernet driver Brute-force removal of #ifdefs. Didn't touch the code. Signed-off-by: Ben Warren --- drivers/net/sk98lin/Makefile | 20 ++++---------------- drivers/net/sk98lin/skaddr.c | 4 ---- drivers/net/sk98lin/skcsum.c | 4 ---- drivers/net/sk98lin/skge.c | 4 ---- drivers/net/sk98lin/skgehwt.c | 5 ----- drivers/net/sk98lin/skgeinit.c | 4 ---- drivers/net/sk98lin/skgemib.c | 4 ---- drivers/net/sk98lin/skgepnmi.c | 4 ---- drivers/net/sk98lin/skgesirq.c | 4 ---- drivers/net/sk98lin/ski2c.c | 4 ---- drivers/net/sk98lin/sklm80.c | 4 ---- drivers/net/sk98lin/skproc.c | 4 ---- drivers/net/sk98lin/skqueue.c | 4 ---- drivers/net/sk98lin/skrlmt.c | 4 ---- drivers/net/sk98lin/sktimer.c | 4 ---- drivers/net/sk98lin/skvpd.c | 4 ---- drivers/net/sk98lin/skxmac2.c | 4 ---- drivers/net/sk98lin/uboot_drv.c | 6 ------ drivers/net/sk98lin/uboot_skb.c | 5 ----- 19 files changed, 4 insertions(+), 92 deletions(-) diff --git a/drivers/net/sk98lin/Makefile b/drivers/net/sk98lin/Makefile index 8b83faeb15..f1bc4a7d5c 100644 --- a/drivers/net/sk98lin/Makefile +++ b/drivers/net/sk98lin/Makefile @@ -29,24 +29,12 @@ include $(TOPDIR)/config.mk LIB := $(obj)libsk98lin.a -COBJS-y += skge.o -COBJS-y += skaddr.o -COBJS-y += skgehwt.o -COBJS-y += skgeinit.o -COBJS-y += skgepnmi.o -COBJS-y += skgesirq.o -COBJS-y += ski2c.o -COBJS-y += sklm80.o -COBJS-y += skqueue.o -COBJS-y += skrlmt.o -COBJS-y += sktimer.o -COBJS-y += skvpd.o -COBJS-y += skxmac2.o -COBJS-y += skcsum.o +COBJS-$(CONFIG_SK98) += skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o \ + skgesirq.o ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o \ + skvpd.o skxmac2.o skcsum.o #COBJS-y += skproc.o -COBJS-y += uboot_skb.o -COBJS-y += uboot_drv.o +COBJS-$(CONFIG_SK98) += uboot_skb.o uboot_drv.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/net/sk98lin/skaddr.c b/drivers/net/sk98lin/skaddr.c index ed79c049bb..8d34f72834 100644 --- a/drivers/net/sk98lin/skaddr.c +++ b/drivers/net/sk98lin/skaddr.c @@ -220,8 +220,6 @@ #include -#ifdef CONFIG_SK98 - #ifndef lint static const char SysKonnectFileId[] = "@(#) $Id: skaddr.c,v 1.48 2003/02/12 17:09:37 tschilli Exp $ (C) SysKonnect."; @@ -1875,5 +1873,3 @@ SK_U32 ToPortNumber) /* Port2 Index */ #ifdef __cplusplus } #endif /* __cplusplus */ - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skcsum.c b/drivers/net/sk98lin/skcsum.c index a5dc572587..162b67df0e 100644 --- a/drivers/net/sk98lin/skcsum.c +++ b/drivers/net/sk98lin/skcsum.c @@ -72,8 +72,6 @@ #include -#ifdef CONFIG_SK98 - #ifdef SK_USE_CSUM /* Check if CSUM is to be used. */ #ifndef lint @@ -925,5 +923,3 @@ SK_EVPARA Param) /* Event dependent parameter. */ } /* SkCsEvent */ #endif /* SK_USE_CSUM */ - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index e1d7e8720c..c815480f8b 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c @@ -342,8 +342,6 @@ #include -#ifdef CONFIG_SK98 - #include "h/skversion.h" #if 0 #include @@ -4860,5 +4858,3 @@ int l; } /* DumpLong */ #endif - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skgehwt.c b/drivers/net/sk98lin/skgehwt.c index f8681a8b0f..ca08eb1de1 100644 --- a/drivers/net/sk98lin/skgehwt.c +++ b/drivers/net/sk98lin/skgehwt.c @@ -75,8 +75,6 @@ #include -#ifdef CONFIG_SK98 - /* Event queue and dispatcher */ @@ -214,7 +212,4 @@ SK_IOC Ioc) /* IoContext */ pAC->Hwt.TStop = pAC->Hwt.TStart; SkTimerDone(pAC,Ioc) ; } - -#endif /* CONFIG_SK98 */ - /* End of file */ diff --git a/drivers/net/sk98lin/skgeinit.c b/drivers/net/sk98lin/skgeinit.c index e49685bb9c..ab740c7fcd 100644 --- a/drivers/net/sk98lin/skgeinit.c +++ b/drivers/net/sk98lin/skgeinit.c @@ -395,8 +395,6 @@ #include -#ifdef CONFIG_SK98 - #include "h/skdrv1st.h" #include "h/skdrv2nd.h" @@ -2367,5 +2365,3 @@ int Port) /* Port to configure */ return(0); } /* SkGeInitPort */ - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skgemib.c b/drivers/net/sk98lin/skgemib.c index 4a9e9e6af1..7f62e9cf39 100644 --- a/drivers/net/sk98lin/skgemib.c +++ b/drivers/net/sk98lin/skgemib.c @@ -52,8 +52,6 @@ #include -#ifdef CONFIG_SK98 - /* * PRIVATE OID handler function prototypes */ @@ -1056,5 +1054,3 @@ PNMI_STATIC const SK_PNMI_TAB_ENTRY IdTable[] = { 0, SK_PNMI_RO, Vct, 0}, }; - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skgepnmi.c b/drivers/net/sk98lin/skgepnmi.c index 16fa3523ab..d0e33cbd6a 100644 --- a/drivers/net/sk98lin/skgepnmi.c +++ b/drivers/net/sk98lin/skgepnmi.c @@ -434,8 +434,6 @@ #include -#ifdef CONFIG_SK98 - static const char SysKonnectFileId[] = "@(#) $Id: skgepnmi.c,v 1.102 2002/12/16 14:03:24 tschilli Exp $" " (C) SysKonnect."; @@ -8306,5 +8304,3 @@ SK_U32 PhysPortIndex) } } /* CheckVctStatus */ - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skgesirq.c b/drivers/net/sk98lin/skgesirq.c index c9763e7401..106fe48c0d 100644 --- a/drivers/net/sk98lin/skgesirq.c +++ b/drivers/net/sk98lin/skgesirq.c @@ -339,8 +339,6 @@ #include -#ifdef CONFIG_SK98 - /* * Special Interrupt handler * @@ -2412,6 +2410,4 @@ SK_U16 IStatus) /* Interrupt Status */ } /* SkPhyIsrLone */ #endif /* OTHER_PHY */ -#endif /* CONFIG_SK98 */ - /* End of File */ diff --git a/drivers/net/sk98lin/ski2c.c b/drivers/net/sk98lin/ski2c.c index 0c5d9b407e..894cc67cbd 100644 --- a/drivers/net/sk98lin/ski2c.c +++ b/drivers/net/sk98lin/ski2c.c @@ -230,8 +230,6 @@ #include -#ifdef CONFIG_SK98 - /* * I2C Protocol */ @@ -1501,5 +1499,3 @@ SK_EVPARA Para) /* Event specific Parameter */ } /* SkI2cEvent*/ #endif /* !SK_DIAG */ - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/sklm80.c b/drivers/net/sk98lin/sklm80.c index 0229877b59..9f455f79bc 100644 --- a/drivers/net/sk98lin/sklm80.c +++ b/drivers/net/sk98lin/sklm80.c @@ -100,8 +100,6 @@ #include -#ifdef CONFIG_SK98 - /* LM80 functions */ @@ -288,5 +286,3 @@ SK_SENSOR *pSen) /* Sensor to be read */ /* Not completed */ return(0); } - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skproc.c b/drivers/net/sk98lin/skproc.c index 94a6a564ac..9325ee7e55 100644 --- a/drivers/net/sk98lin/skproc.c +++ b/drivers/net/sk98lin/skproc.c @@ -72,8 +72,6 @@ #include -#ifdef CONFIG_SK98 - #include #include "h/skdrv1st.h" @@ -510,5 +508,3 @@ char * SkNumber(char * str, long long num, int base, int size, int precision return strorg; } - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skqueue.c b/drivers/net/sk98lin/skqueue.c index c49baed4f0..de7441e3b8 100644 --- a/drivers/net/sk98lin/skqueue.c +++ b/drivers/net/sk98lin/skqueue.c @@ -89,8 +89,6 @@ #include -#ifdef CONFIG_SK98 - /* Event queue and dispatcher */ @@ -237,6 +235,4 @@ SK_IOC Ioc) /* Io context */ return(0) ; } -#endif /* CONFIG_SK98 */ - /* End of file */ diff --git a/drivers/net/sk98lin/skrlmt.c b/drivers/net/sk98lin/skrlmt.c index 14a6f40d8b..2e7924d011 100644 --- a/drivers/net/sk98lin/skrlmt.c +++ b/drivers/net/sk98lin/skrlmt.c @@ -282,8 +282,6 @@ #include -#ifdef CONFIG_SK98 - #ifndef lint static const char SysKonnectFileId[] = "@(#) $Id: skrlmt.c,v 1.68 2003/01/31 15:26:56 rschmidt Exp $ (C) SysKonnect."; @@ -3504,5 +3502,3 @@ SK_EVPARA Para) /* Event-specific parameter */ #ifdef __cplusplus } #endif /* __cplusplus */ - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/sktimer.c b/drivers/net/sk98lin/sktimer.c index 37cd4c9fe1..8363ce4658 100644 --- a/drivers/net/sk98lin/sktimer.c +++ b/drivers/net/sk98lin/sktimer.c @@ -74,8 +74,6 @@ #include -#ifdef CONFIG_SK98 - /* Event queue and dispatcher */ @@ -292,6 +290,4 @@ int Restart) /* Do we need to restart the Hardware timer ? */ } } -#endif /* CONFIG_SK98 */ - /* End of file */ diff --git a/drivers/net/sk98lin/skvpd.c b/drivers/net/sk98lin/skvpd.c index 429da8256e..7935195fa9 100644 --- a/drivers/net/sk98lin/skvpd.c +++ b/drivers/net/sk98lin/skvpd.c @@ -162,8 +162,6 @@ #include -#ifdef CONFIG_SK98 - /* Please refer skvpd.txt for infomation how to include this module */ @@ -1325,5 +1323,3 @@ char *msg) /* error log message */ (void)VpdUpdate(pAC, IoC); } - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/skxmac2.c b/drivers/net/sk98lin/skxmac2.c index 794600054a..e0ded42bae 100644 --- a/drivers/net/sk98lin/skxmac2.c +++ b/drivers/net/sk98lin/skxmac2.c @@ -412,8 +412,6 @@ #include -#ifdef CONFIG_SK98 - #include "h/skdrv1st.h" #include "h/skdrv2nd.h" @@ -4391,6 +4389,4 @@ SK_BOOL StartTest) /* flag for start / get result */ return(0); } /* SkGmCableDiagStatus */ -#endif /* CONFIG_SK98 */ - /* End of file */ diff --git a/drivers/net/sk98lin/uboot_drv.c b/drivers/net/sk98lin/uboot_drv.c index d02cd1be24..8b04842c1a 100644 --- a/drivers/net/sk98lin/uboot_drv.c +++ b/drivers/net/sk98lin/uboot_drv.c @@ -25,9 +25,6 @@ #include -#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \ - defined(CONFIG_SK98) - #include "h/skdrv1st.h" #include "h/skdrv2nd.h" #include "u-boot_compat.h" @@ -138,6 +135,3 @@ static int skge_recv(struct eth_device *dev) return 0; } - - -#endif /* CONFIG_SK98 */ diff --git a/drivers/net/sk98lin/uboot_skb.c b/drivers/net/sk98lin/uboot_skb.c index 3a487a8e3d..487f01ed37 100644 --- a/drivers/net/sk98lin/uboot_skb.c +++ b/drivers/net/sk98lin/uboot_skb.c @@ -24,9 +24,6 @@ */ #include - -#ifdef CONFIG_SK98 - #include #include "u-boot_compat.h" @@ -118,5 +115,3 @@ void skb_put(struct sk_buff *skb, unsigned int len) { skb->len+=len; } - -#endif /* CONFIG_SK98 */ -- 2.39.5