net drivers: missing __init's
PATCH 1/1 net drivers: missing __init's
Hi all,
attached patches add missing __init and (__devinit) to some network drivers:
at1700.c, eepro.c, epic100.c, hamachi.c, sis900.c, tokenring/abyss.c, tokenring/tmsisa.c, tokenring/tmspci.c.
Best regards.
Signature · 2 lines
Andrey Panin | Embedded systems software engineer [email protected] | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
linux/drivers/net/at1700.c renamed from linux.vanilla/drivers/net/at1700.c +1 -1
@@ -470,7 +470,7 @@#define EE_READ_CMD (6 << 6)#define EE_ERASE_CMD (7 << 6) -static int read_eeprom (int ioaddr,int location) +static int __init read_eeprom (int ioaddr,int location) {int i;unsigned short retval =0 ;
linux/drivers/net/eepro.c renamed from linux.vanilla/drivers/net/eepro.c +2 -2
@@ -588,7 +588,7 @@return -ENODEV ; } -static void printEEPROMInfo (short ioaddr,struct net_device *dev) +static void __init printEEPROMInfo (short ioaddr,struct net_device *dev) {unsigned short Word;int i,j;
@@ -647,7 +647,7 @@probes on the ISA bus. A good device probe avoids doing writes, and verifies that the correct device exists and functions. */ -static int eepro_probe1 (struct net_device *dev,short ioaddr) +static int __init eepro_probe1 (struct net_device *dev,short ioaddr) {unsigned short station_addr[6 ], id, counter;int i,j, irqMask;
linux/drivers/net/epic100.c renamed from linux.vanilla/drivers/net/epic100.c +1 -1
@@ -545,7 +545,7 @@#define EE_READ256_CMD (6 << 8)#define EE_ERASE_CMD (7 << 6) -static int read_eeprom (long ioaddr,int location) +static int __devinit read_eeprom (long ioaddr,int location) {int i;int retval =0 ;
linux/drivers/net/hamachi.c renamed from linux.vanilla/drivers/net/hamachi.c +3 -3
@@ -545,7 +544,7 @@static void set_rx_mode (struct net_device *dev); -static int __init hamachi_init_one (struct pci_dev *pdev, +static int __devinit hamachi_init_one (struct pci_dev *pdev,const struct pci_device_id *ent) {static int did_version =0 ;/* Already printed version info. */
@@ -728,7 +727,7 @@return 0 ; } -static int read_eeprom (long ioaddr,int location) +static int __devinit read_eeprom (long ioaddr,int location) {int bogus_cnt =1000 ;
@@ -1858,7 +1857,7 @@ } -static void __exit hamachi_remove_one (struct pci_dev *pdev) +static void __devexit hamachi_remove_one (struct pci_dev *pdev) {struct net_device *dev =pci_get_drvdata (pdev);
linux/drivers/net/sis900.c renamed from linux.vanilla/drivers/net/sis900.c +2 -2
@@ -60,7 +60,7 @@#include "sis900.h" -static const char *version = +static const char *version__initdata ="sis900.c: v1.07.09 2/9/2001\n" ;static int max_interrupt_work =20 ;
@@ -443,7 +443,7 @@* Note that location is in word (16 bits) unit */ -static u16 read_eeprom (long ioaddr,int location) +static u16 __devinit read_eeprom (long ioaddr,int location) {int i;u16 retval =0 ;
linux/drivers/net/tokenring/abyss.c renamed from linux.vanilla/drivers/net/tokenring/abyss.c +1 -1
@@ -390,7 +390,7 @@* Read configuration data from the AT24 SEEPROM on Madge cards. * */ -static void abyss_read_eeprom (struct net_device *dev) +static void __init abyss_read_eeprom (struct net_device *dev) {struct net_local *tp;unsigned long ioaddr;
linux/drivers/net/tokenring/tmsisa.c renamed from linux.vanilla/drivers/net/tokenring/tmsisa.c +2 -2
@@ -19,7 +19,7 @@* TODO: * 1. Add support for Proteon TR ISA adapters (1392, 1392+) */ -static const char *version ="tmsisa.c: v1.00 14/01/2001 by Jochen Friedrich\n" ; +static const char version[]__initdata ="tmsisa.c: v1.00 14/01/2001 by Jochen Friedrich\n" ;#include <linux/module.h> #include <linux/kernel.h>
@@ -297,7 +297,7 @@* machine hard when this is called. Luckily, its supported in a * seperate driver. --ASF */ -static void tms_isa_read_eeprom (struct net_device *dev) +static void __init tms_isa_read_eeprom (struct net_device *dev) {int i;
linux/drivers/net/tokenring/tmspci.c renamed from linux.vanilla/drivers/net/tokenring/tmspci.c +3 -3
@@ -90,7 +90,7 @@outw (val, dev->base_addr + reg); } -static int __init tms_pci_attach (struct pci_dev *pdev,const struct pci_device_id *ent) +static int __devinit tms_pci_attach (struct pci_dev *pdev,const struct pci_device_id *ent) {static int versionprinted;struct net_device *dev;
@@ -192,7 +192,7 @@* machine hard when this is called. Luckily, its supported in a * seperate driver. --ASF */ -static void tms_pci_read_eeprom (struct net_device *dev) +static void __devinit tms_pci_read_eeprom (struct net_device *dev) {int i;
@@ -219,7 +219,7 @@return val; } -static void __exit tms_pci_detach (struct pci_dev *pdev) +static void __devexit tms_pci_detach (struct pci_dev *pdev) {struct net_device *dev =pci_get_drvdata (pdev);
"Andrey Panin wrote:"
Quoted 11 lines
attached patches add missing
__initand (__devinit) to some network drivers:at1700.c, eepro.c, epic100.c, hamachi.c, sis900.c,=20 tokenring/abyss.c, tokenring/tmsisa.c, tokenring/tmspci.c.diff -ur -x *.o -x *.flags /linux.vanilla/drivers/net/tokenring/tmsisa.c /l=
inux/drivers/net/tokenring/tmsisa.c
linux/drivers/net/tokenring/tmsisa.c line 22
Quoted 5 lines
linux/drivers/net/tokenring/tmsisa.c renamed from linux.vanilla/drivers/net/tokenring/tmsisa.c +1
-1@@ -19,7 +19,7 @@* TODO: * 1. Add support for Proteon TR ISA adapters (1392, 1392+) */ -static const char *version ="tmsisa.c: v1.00 14/01/2001 by Jochen Friedrich\n" ; +static const char version[]__initdata ="tmsisa.c: v1.00 14/01/2001 by Jochen Friedrich\n" ;
You should move this line after
#include <linux/init.h>
linux/drivers/net/tokenring/tmsisa.c line 25
Quoted 2 lines
linux/drivers/net/tokenring/tmsisa.c renamed from linux.vanilla/drivers/net/tokenring/tmsisa.c +0
-0#include <linux/module.h> #include <linux/kernel.h>
Andrzej