Skip to contentSkip to conversation

(24/42) ne2

PATCH New Stephen Hemminger 1 participant 1 message Nov 13, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 (24/42) ne2

NE48-ne2 from viro
* switched ne2 to dynamic allocation
* ne2: fixed order of freeing bugs
* ne2: fixed resource leaks on failure exits

drivers/net/Space.c +6 -12
diff -Nru a/drivers/net/Space.c b/drivers/net/Space.c
@@ -40,7 +40,7 @@
    ethernet adaptor have the name "eth[0123...]".
    */
 
-extern int ne2_probe(struct net_device *dev);
+extern struct net_device *ne2_probe(int unit);
 extern struct net_device *hp100_probe(int unit);
 extern struct net_device *ultra_probe(int unit);
 extern int ultra32_probe(struct net_device *dev);
@@ -176,15 +176,10 @@
 	{NULL, 0},
 };
 
-
-static struct devprobe mca_probes[] __initdata = {
+static struct devprobe2 mca_probes[] __initdata = {
 #ifdef CONFIG_NE2_MCA
 	{ne2_probe, 0},
 #endif
-	{NULL, 0},
-};
-
-static struct devprobe2 mca_probes2[] __initdata = {
 #ifdef CONFIG_ELMC		/* 3c523 */
 	{elmc_probe, 0},
 #endif
@@ -201,7 +196,7 @@
  * ISA probes that touch addresses < 0x400 (including those that also
  * look for EISA/PCI/MCA cards in addition to ISA cards).
  */
-static struct devprobe2 isa_probes2[] __initdata = {
+static struct devprobe2 isa_probes[] __initdata = {
 #ifdef CONFIG_HP100 		/* ISA, EISA & PCI */
 	{hp100_probe, 0},
 #endif	
@@ -381,8 +376,7 @@
 	 */
 	if (probe_list(dev, m68k_probes) == 0 ||
 	    probe_list(dev, mips_probes) == 0 ||
-	    probe_list(dev, eisa_probes) == 0 ||
-	    probe_list(dev, mca_probes) == 0)
+	    probe_list(dev, eisa_probes) == 0)
 		err = register_netdev(dev);
 
 	if (err)
@@ -398,8 +392,8 @@
 	if (base_addr == 1)
 		return;
 
-	probe_list2(unit, mca_probes2, base_addr == 0) &&
-	probe_list2(unit, isa_probes2, base_addr == 0) &&
+	probe_list2(unit, mca_probes, base_addr == 0) &&
+	probe_list2(unit, isa_probes, base_addr == 0) &&
 	probe_list2(unit, parport_probes, base_addr == 0);
 }
 
drivers/net/ne2.c +63 -19

130 lines not on this page · raw message