Subject: [PATCH] tg3: reading eeprom via ethtool: not __init

From: "Randy.Dunlap" <[email-masked]>
Date: Tue, 19 Oct 2004 21:28:05 -0700

-- 
~Randy

tg3_get_eeprom calls:  tg3_nvram_read_using_eeprom __init:
but the latter cannot be __init if it can be called (via ethtool)
after driver-init:
Error: ./drivers/net/tg3.o .text refers to 0000000000007220 R_X86_64_PC32     .init.text+0xfffffffffffffffc
Error: ./drivers/net/tg3.o .text refers to 000000000000725d R_X86_64_PC32     .init.text+0xfffffffffffffffc
Error: ./drivers/net/tg3.o .text refers to 00000000000072a7 R_X86_64_PC32     .init.text+0xfffffffffffffffc
Error: ./drivers/net/tg3.o .text refers to 00000000000072e8 R_X86_64_PC32     .init.text+0xfffffffffffffffc

Signed-off-by: Randy Dunlap <[email-masked]>

diffstat:=
 drivers/net/tg3.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -Naurp ./drivers/net/tg3.c~tg3_init ./drivers/net/tg3.c
--- ./drivers/net/tg3.c~tg3_init	2004-10-18 14:54:31.000000000 -0700
+++ ./drivers/net/tg3.c	2004-10-19 20:43:44.510473240 -0700
@@ -6319,8 +6319,8 @@ static int tg3_get_eeprom_len(struct net
 	return EEPROM_CHIP_SIZE;
 }
 
-static int __devinit tg3_nvram_read_using_eeprom(struct tg3 *tp,
-						 u32 offset, u32 *val);
+static int tg3_nvram_read_using_eeprom(struct tg3 *tp,
+					u32 offset, u32 *val);
 static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data)
 {
 	struct tg3 *tp = dev->priv;
@@ -6851,8 +6851,8 @@ static void __devinit tg3_nvram_init(str
 	}
 }
 
-static int __devinit tg3_nvram_read_using_eeprom(struct tg3 *tp,
-						 u32 offset, u32 *val)
+static int tg3_nvram_read_using_eeprom(struct tg3 *tp,
+					u32 offset, u32 *val)
 {
 	u32 tmp;
 	int i;