From: Christoph Hellwig <hch@lst.de>
To: netdev@oss.sgi.com
Subject: [PATCH] switch sdla to initcalls
Date: Wed, 21 May 2003 10:11:26 +0200 [thread overview]
Message-ID: <20030521101126.A30197@lst.de> (raw)
Wow, on driver that had it's dirt fingers in both Space.c and setup.c :)
--- 1.20/drivers/net/Space.c Wed May 21 03:56:26 2003
+++ edited/drivers/net/Space.c Tue May 20 11:50:12 2003
@@ -453,17 +453,6 @@
#define NEXT_DEV (&tap0_dev)
#endif
-#ifdef CONFIG_SDLA
-extern int sdla_init(struct net_device *);
-static struct net_device sdla0_dev = {
- .name = "sdla0",
- .next = NEXT_DEV,
- .init = sdla_init,
-};
-#undef NEXT_DEV
-#define NEXT_DEV (&sdla0_dev)
-#endif
-
#if defined(CONFIG_LTPC)
extern int ltpc_probe(struct net_device *);
static struct net_device dev_ltpc = {
--- 1.11/drivers/net/setup.c Tue May 20 08:57:38 2003
+++ edited/drivers/net/setup.c Tue May 20 11:56:00 2003
@@ -14,8 +14,6 @@
extern int arcnet_init(void);
extern int scc_enet_init(void);
extern int fec_enet_init(void);
-extern int sdla_setup(void);
-extern int sdla_c_setup(void);
extern int lmc_setup(void);
extern int madgemc_probe(void);
@@ -39,9 +37,6 @@
#if defined(CONFIG_DMASCC)
{dmascc_init, 0},
#endif
-#if defined(CONFIG_SDLA)
- {sdla_c_setup, 0},
-#endif
#if defined(CONFIG_ARCNET)
{arcnet_init, 0},
#endif
--- 1.10/drivers/net/wan/sdla.c Sun May 18 17:18:07 2003
+++ edited/drivers/net/wan/sdla.c Tue May 20 11:52:15 2003
@@ -1655,32 +1655,25 @@
return(0);
}
-int __init sdla_c_setup(void)
-{
- printk("%s.\n", version);
- register_frad(devname);
- return 0;
-}
-
-#ifdef MODULE
static struct net_device sdla0 = {
.name = "sdla0",
.init = sdla_init
};
-MODULE_LICENSE("GPL");
-int init_module(void)
+static int __init init_sdla(void)
{
int result;
- sdla_c_setup();
+ printk("%s.\n", version);
+ register_frad(devname);
+
if ((result = register_netdev(&sdla0)) != 0)
return result;
return 0;
}
-void cleanup_module(void)
+static void __exit exit_sdla(void)
{
unregister_netdev(&sdla0);
if (sdla0.priv)
@@ -1688,4 +1681,8 @@
if (sdla0.irq)
free_irq(sdla0.irq, &sdla0);
}
-#endif /* MODULE */
+
+MODULE_LICENSE("GPL");
+
+module_init(init_sdla);
+module_exit(exit_sdla);
next reply other threads:[~2003-05-21 8:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 8:11 Christoph Hellwig [this message]
2003-05-21 8:19 ` [PATCH] switch sdla to initcalls Andi Kleen
2003-05-21 8:25 ` Christoph Hellwig
2003-05-21 8:26 ` Andi Kleen
2003-05-21 8:34 ` David S. Miller
2003-05-21 10:31 ` Andi Kleen
2003-05-22 4:59 ` Paul Gortmaker
2003-05-21 10:33 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030521101126.A30197@lst.de \
--to=hch@lst.de \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).