Skip to content

Commit 60903f2

Browse files
AdrianBunkDavid S. Miller
authored andcommitted
[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 <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ee74baa commit 60903f2

2 files changed

Lines changed: 3 additions & 12 deletions

File tree

‎drivers/net/Space.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -349,22 +349,11 @@ static void __init trif_probe2(int unit)
349349
#endif
350350

351351

352-
/*
353-
* The loopback device is global so it can be directly referenced
354-
* by the network code. Also, it must be first on device list.
355-
*/
356-
extern int loopback_init(void);
357-
358352
/* Statically configured drivers -- order matters here. */
359353
static int __init net_olddevs_init(void)
360354
{
361355
int num;
362356

363-
if (loopback_init()) {
364-
printk(KERN_ERR "Network loopback device setup failed\n");
365-
}
366-
367-
368357
#ifdef CONFIG_SBNI
369358
for (num = 0; num < 8; ++num)
370359
sbni_probe(num);

‎drivers/net/loopback.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,11 @@ struct net_device loopback_dev = {
229229
};
230230

231231
/* Setup and register the loopback device. */
232-
int __init loopback_init(void)
232+
static int __init loopback_init(void)
233233
{
234234
return register_netdev(&loopback_dev);
235235
};
236236

237+
module_init(loopback_init);
238+
237239
EXPORT_SYMBOL(loopback_dev);

0 commit comments

Comments
 (0)