All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: netdev@oss.sgi.com
Subject: [PATCH] convert madgemc to initcalls
Date: Fri, 23 May 2003 09:18:58 +0200	[thread overview]
Message-ID: <20030523091858.A28081@lst.de> (raw)

This is a MCA driver so there should be no probe order issues.


--- 1.13/drivers/net/tokenring/madgemc.c	Mon Apr 28 05:36:20 2003
+++ edited/drivers/net/tokenring/madgemc.c	Thu May 22 11:22:50 2003
@@ -63,7 +63,6 @@
 static struct madgemc_card *madgemc_card_list;
 
 
-int madgemc_probe(void);
 static int madgemc_open(struct net_device *dev);
 static int madgemc_close(struct net_device *dev);
 static int madgemc_chipset_init(struct net_device *dev);
@@ -152,7 +151,7 @@
 
 
 
-int __init madgemc_probe(void)
+static int __init madgemc_probe(void)
 {	
 	static int versionprinted;
 	struct net_device *dev;
@@ -773,19 +772,7 @@
 	return len;
 }
 
-#ifdef MODULE
-
-int init_module(void)
-{
-	/* Probe for cards. */
-	if (madgemc_probe()) {
-		printk(KERN_NOTICE "madgemc.c: No cards found.\n");
-	}
-	/* lock_tms380_module(); */
-	return (0);
-}
-
-void cleanup_module(void)
+static void __exit madgemc_exit(void)
 {
 	struct net_device *dev;
 	struct madgemc_card *this_card;
@@ -801,9 +788,10 @@
 		madgemc_card_list = this_card->next;
 		kfree(this_card);
 	}
-	/* unlock_tms380_module(); */
 }
-#endif /* MODULE */
+
+module_init(madgemc_probe);
+module_exit(madgemc_exit);
 
 MODULE_LICENSE("GPL");
 
--- 1.12/drivers/net/setup.c	Thu May 22 10:08:06 2003
+++ edited/drivers/net/setup.c	Thu May 22 11:21:55 2003
@@ -17,8 +17,6 @@
 extern int sdla_c_setup(void); 
 extern int lmc_setup(void);
 
-extern int madgemc_probe(void);
-
 /*
  *	Devices in this list must do new style probing. That is they must
  *	allocate their own device objects and do their own bus scans.
@@ -50,14 +48,6 @@
 #if defined(CONFIG_LANMEDIA)
 	{lmc_setup, 0},
 #endif
-	 
-/*
- *	Token Ring Drivers
- */  
-#ifdef CONFIG_MADGEMC
-	{madgemc_probe, 0},
-#endif
- 
 	{NULL, 0},
 };
 

             reply	other threads:[~2003-05-23  7:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23  7:18 Christoph Hellwig [this message]
2003-05-23  7:50 ` [PATCH] convert madgemc to initcalls 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=20030523091858.A28081@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.