Skip to contentSkip to conversation

switch sb1000 to new style net init & pnp

PATCH New Christoph Hellwig 1 participant 1 message May 10, 2003

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

PATCH 1/1 switch sb1000 to new style net init & pnp

This cleans up the driver big time and gets rid of a big ugly wart in setup.c. Note that I don't have the hardware so this is only compile-tested.

drivers/net/Kconfig +1 -1
@@ -158,7 +158,7 @@
 
 config NET_SB1000
 	tristate "General Instruments Surfboard 1000"
-	depends on NETDEVICES && ISAPNP
+	depends on NETDEVICES && PNP
 	---help---
 	  This is a driver for the General Instrument (also known as
 	  NextLevel) SURFboard 1000 internal
drivers/net/sb1000.c +112 -175

325 lines not on this page · raw message

===== drivers/net/setup.c 1.9 vs edited =====

drivers/net/setup.c +1 -34
@@ -21,14 +21,6 @@
 
 extern int madgemc_probe(void);
 
-/* Pad device name to IFNAMSIZ=16. F.e. __PAD6 is string of 9 zeros. */
-#define __PAD6 "\0\0\0\0\0\0\0\0\0"
-#define __PAD5 __PAD6 "\0"
-#define __PAD4 __PAD5 "\0"
-#define __PAD3 __PAD4 "\0"
-#define __PAD2 __PAD3 "\0"
-
-
 /*
  *	Devices in this list must do new style probing. That is they must
  *	allocate their own device objects and do their own bus scans.
@@ -84,7 +76,7 @@
  *	into them.
  */
  
-static void __init network_probe(void)
+void __init net_device_init(void)
 {
 	struct net_probe *p = pci_probes;
 
@@ -93,29 +85,4 @@
 		p->status = p->probe();
 		p++;
 	}
-}
-
-static void __init special_device_init(void)
-{
-#ifdef CONFIG_NET_SB1000
-	extern int sb1000_probe(struct net_device *dev);
-
-	static struct net_device sb1000_dev = {
-		.name = "cm0" __PAD3,
-		.init = sb1000_probe,
-	};
-	register_netdev(&sb1000_dev);
-#endif
-}
-
-/*
- *	Initialise network devices
- */
- 
-void __init net_device_init(void)
-{
-	/* Devices supporting the new^H^H^Hold probing API */
-	network_probe();
-	/* Special devices */
-	special_device_init();
 }