From: Adrian Bunk Date: Tue, 2 Jan 2007 08:35:48 +0000 (-0800) Subject: [NET] drivers/net/loopback.c: convert to module_init() X-Git-Tag: v2.6.20-rc4~85^2~12 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60903f2c6616939afd0335b49697beeb7219657e;p=linux-2.6 [NET] drivers/net/loopback.c: convert to module_init() This patch converts drivers/net/loopback.c to using module_init(). Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller --- diff --git a/drivers/net/Space.c b/drivers/net/Space.c index 602ed31a5d..9305eb9b1b 100644 --- a/drivers/net/Space.c +++ b/drivers/net/Space.c @@ -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); diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 82c10dec1b..2b739fd584 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -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);