From: Randy Dunlap Date: Tue, 11 Apr 2006 06:22:06 +0000 (-0700) Subject: [PATCH] net drivers: fix section attributes for gcc X-Git-Tag: v2.6.17-rc2~81^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e19360f2945f54eb44ae170ec9c33910d29834a2;p=linux-2.6 [PATCH] net drivers: fix section attributes for gcc If CONFIG_HOTPLUG=n, gcc doesn't like some __initdata to be const (rodata) and other __initdata not const, so make the non-const __initdata const. gcc errors: drivers/net/bnx2.c:66: error: version causes a section type conflict drivers/net/starfire.c:338: error: version causes a section type conflict drivers/net/typhoon.c:137: error: version causes a section type conflict drivers/net/natsemi.c:241: error: version causes a section type conflict Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 2671da20a4..5ca99e2666 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -63,7 +63,7 @@ /* Time in jiffies before concluding the transmitter is hung. */ #define TX_TIMEOUT (5*HZ) -static char version[] __devinitdata = +static const char version[] __devinitdata = "Broadcom NetXtreme II Gigabit Ethernet Driver " DRV_MODULE_NAME " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; MODULE_AUTHOR("Michael Chan "); diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 7826afbb9d..90627756d6 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c @@ -238,7 +238,7 @@ static int full_duplex[MAX_UNITS]; #define NATSEMI_RX_LIMIT 2046 /* maximum supported by hardware */ /* These identify the driver base version and may not be removed. */ -static char version[] __devinitdata = +static const char version[] __devinitdata = KERN_INFO DRV_NAME " dp8381x driver, version " DRV_VERSION ", " DRV_RELDATE "\n" KERN_INFO " originally by Donald Becker \n" diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 45ad036733..9b7805be21 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c @@ -335,7 +335,7 @@ do { \ /* These identify the driver base version and may not be removed. */ -static char version[] __devinitdata = +static const char version[] __devinitdata = KERN_INFO "starfire.c:v1.03 7/26/2000 Written by Donald Becker \n" KERN_INFO " (unofficial 2.2/2.4 kernel port, version " DRV_VERSION ", " DRV_RELDATE ")\n"; diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index c1ce87a5f8..d9258d4209 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c @@ -134,7 +134,7 @@ static const int multicast_filter_limit = 32; #include "typhoon.h" #include "typhoon-firmware.h" -static char version[] __devinitdata = +static const char version[] __devinitdata = "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; MODULE_AUTHOR("David Dillow ");