[NET] drivers/net/loopback.c: convert to module_init()
authorAdrian Bunk <bunk@stusta.de>
Tue, 2 Jan 2007 08:35:48 +0000 (00:35 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 4 Jan 2007 02:38:10 +0000 (18:38 -0800)
This patch converts drivers/net/loopback.c to using module_init().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/Space.c
drivers/net/loopback.c

index 602ed31..9305eb9 100644 (file)
@@ -349,22 +349,11 @@ static void __init trif_probe2(int unit)
 #endif
 
 
-/*
- *     The loopback device is global so it can be directly referenced
- *     by the network code. Also, it must be first on device list.
- */
-extern int loopback_init(void);
-
 /*  Statically configured drivers -- order matters here. */
 static int __init net_olddevs_init(void)
 {
        int num;
 
-       if (loopback_init()) {
-               printk(KERN_ERR "Network loopback device setup failed\n");
-       }
-
-
 #ifdef CONFIG_SBNI
        for (num = 0; num < 8; ++num)
                sbni_probe(num);
index 82c10de..2b739fd 100644 (file)
@@ -229,9 +229,11 @@ struct net_device loopback_dev = {
 };
 
 /* Setup and register the loopback device. */
-int __init loopback_init(void)
+static int __init loopback_init(void)
 {
        return register_netdev(&loopback_dev);
 };
 
+module_init(loopback_init);
+
 EXPORT_SYMBOL(loopback_dev);