Update of /cvsroot/linux-mips/linux/drivers/net
In directory usw-pr-cvs1:/tmp/cvs-serv28294/drivers/net
Modified Files:
au1000_eth.c
Log Message:
Converted eth driver to use module_init interface instead
of the old Space.c probing.
Index: au1000_eth.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/drivers/net/au1000_eth.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** au1000_eth.c 2001/08/28 07:23:54 1.4
--- au1000_eth.c 2001/08/30 18:13:31 1.5
***************
*** 91,96 ****
extern char * __init prom_getcmdline(void);
- static int next_dev;
-
/*
* Theory of operation
--- 91,94 ----
***************
*** 122,126 ****
static char version[] __devinitdata =
! "au1000eth.c:0.1 pp...@mv...\n";
/* These addresses are only used if yamon doesn't tell us what
--- 120,124 ----
static char version[] __devinitdata =
! "au1000eth.c:0.2 pp...@mv...\n";
/* These addresses are only used if yamon doesn't tell us what
***************
*** 519,551 ****
}
! /*
! * Probe for a AU1000 ethernet controller.
! */
! int __init au1000_probe(struct net_device *dev)
{
! int base_addr = au1000_iflist[next_dev].port;
! int irq = au1000_iflist[next_dev].irq;
!
! #ifndef CONFIG_MIPS_AU1000_ENET
! return -ENODEV;
! #endif
!
! if (au1000_debug > 4)
! printk(KERN_INFO "%s: au1000_probe base_addr %x\n",
! dev->name, base_addr);
! if (next_dev >= NUM_INTERFACES) {
! return -ENODEV;
! }
! if (au1000_probe1(dev, base_addr, irq, next_dev) == 0) {
! next_dev++;
! return 0;
}
! next_dev++;
! return -ENODEV;
}
-
-
static int __init
au1000_probe1(struct net_device *dev, long ioaddr, int irq, int port_num)
--- 517,535 ----
}
! static int __init au1000_init_module(void)
{
! int i;
! int base_addr, irq;
! for (i=0; i<NUM_INTERFACES; i++) {
! base_addr = au1000_iflist[i].port;
! irq = au1000_iflist[i].irq;
! if (au1000_probe1(NULL, base_addr, irq, i) != 0) {
! return -ENODEV;
! }
}
! return 0;
}
static int __init
au1000_probe1(struct net_device *dev, long ioaddr, int irq, int port_num)
***************
*** 878,881 ****
--- 862,869 ----
}
+ static void __exit au1000_cleanup_module(void)
+ {
+ }
+
static inline void update_tx_stats(struct net_device *dev, u32 status, u32 pkt_len)
***************
*** 1291,1292 ****
--- 1279,1283 ----
return 0;
}
+
+ module_init(au1000_init_module);
+ module_exit(au1000_cleanup_module);
|