netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] drivers/net/loopback.c: convert to module_init()
@ 2006-12-12 16:24 Adrian Bunk
  2006-12-13  1:17 ` David Miller
  0 siblings, 1 reply; 17+ messages in thread
From: Adrian Bunk @ 2006-12-12 16:24 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, linux-kernel

This patch converts drivers/net/loopback.c to using module_init().

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/net/Space.c    |   11 -----------
 drivers/net/loopback.c |    4 +++-
 2 files changed, 3 insertions(+), 12 deletions(-)

--- linux-2.6.19-mm1/drivers/net/loopback.c.old	2006-12-12 15:59:02.000000000 +0100
+++ linux-2.6.19-mm1/drivers/net/loopback.c	2006-12-12 16:02:11.000000000 +0100
@@ -229,9 +229,11 @@
 };
 
 /* 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);
--- linux-2.6.19-mm1/drivers/net/Space.c.old	2006-12-12 15:59:11.000000000 +0100
+++ linux-2.6.19-mm1/drivers/net/Space.c	2006-12-12 16:01:35.000000000 +0100
@@ -345,22 +345,11 @@
 #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);


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2006-12-14  0:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 16:24 [2.6 patch] drivers/net/loopback.c: convert to module_init() Adrian Bunk
2006-12-13  1:17 ` David Miller
2006-12-13 13:40   ` Adrian Bunk
2006-12-13 13:54     ` Thomas Graf
2006-12-13 19:08   ` Stephen Hemminger
2006-12-13 19:36     ` Adrian Bunk
2006-12-13 20:12   ` Al Viro
2006-12-13 20:49     ` Thomas Graf
2006-12-13 23:01       ` Stephen Hemminger
2006-12-13 23:12         ` Adrian Bunk
2006-12-13 23:18           ` Thomas Graf
2006-12-13 23:31             ` Adrian Bunk
2006-12-13 23:41               ` Stephen Hemminger
2006-12-14  0:21                 ` David Miller
2006-12-14  0:23                 ` David Miller
2006-12-14  0:18             ` David Miller
2006-12-14  0:37     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).