Skip to contentSkip to conversation

remove sdla from setup.c

PATCH In review Christoph Hellwig 3 participants 4 messages May 28, 2003 – May 29, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove sdla from setup.c

sdla had calls from both Space.c and setup.c. Leave the Space.c one alone as per previous discussion but move over the setup.c one to initcalls. (and remove the prototype for a third one from setup.c!)

drivers/net/setup.c +0 -5
@@ -13,8 +13,6 @@
 
 extern int scc_enet_init(void); 
 extern int fec_enet_init(void); 
-extern int sdla_setup(void); 
-extern int sdla_c_setup(void); 
 
 /*
  *	Devices in this list must do new style probing. That is they must
@@ -35,9 +33,6 @@
 #if defined(CONFIG_DMASCC)
 	{dmascc_init, 0},
 #endif	
-#if defined(CONFIG_SDLA)
-	{sdla_c_setup, 0},
-#endif
 #if defined(CONFIG_SCC_ENET)
         {scc_enet_init, 0},
 #endif

===== drivers/net/wan/sdla.c 1.10 vs edited =====

drivers/net/wan/sdla.c +13 -9
@@ -1667,20 +1667,20 @@
 	.name = "sdla0",
 	.init = sdla_init
 };
+#endif /* MODULE */
 
-MODULE_LICENSE("GPL");
-
-int init_module(void)
+static int __init init_sdla(void)
 {
-	int result;
+	int result = 0;
 
 	sdla_c_setup();
-	if ((result = register_netdev(&sdla0)) != 0)
-		return result;
-	return 0;
+#ifdef MODULE
+	result = register_netdev(&sdla0);
+#endif
+	return result;
 }
 
-void cleanup_module(void)
+static void __exit exit_sdla(void)
 {
 	unregister_netdev(&sdla0);
 	if (sdla0.priv)
@@ -1688,4 +1688,8 @@
 	if (sdla0.irq)
 		free_irq(sdla0.irq, &sdla0);
 }
-#endif /* MODULE */
+
+MODULE_LICENSE("GPL");
+
+module_init(init_sdla);
+module_exit(exit_sdla);
#1 lore raw

From: Christoph Hellwig <[email protected]>
Date: Wed, 28 May 2003 13:06:58 +0200

sdla had calls from both Space.c and setup.c. Leave the Space.c one alone as per previous discussion but move over the setup.c one to initcalls. (and remove the prototype for a third one from setup.c!)

Looks ok, applied.

Some of this wan driver stuff is so crappy :(

#2 lore raw

Em Thu, May 29, 2003 at 02:57:49AM -0700, David S. Miller escreveu:

Quoted 10 lines

From: Christoph Hellwig <[email protected]>
Date: Wed, 28 May 2003 13:06:58 +0200

sdla had calls from both Space.c and setup.c. Leave the Space.c one alone as per previous discussion but move over the setup.c one to initcalls. (and remove the prototype for a third one from setup.c!)

Looks ok, applied.

Some of this wan driver stuff is so crappy :(

Crappy? You are being nice...

What about this:

void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags)

{
        spin_lock_irqsave(lock, *smp_flags);
}

Why the hell do we need a bogus wrapper for something so standard?

:-(

- Arnaldo

#3 lore raw

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Thu, 29 May 2003 12:36:25 -0300

Em Thu, May 29, 2003 at 02:57:49AM -0700, David S. Miller escreveu:

Quoted 1 line

Some of this wan driver stuff is so crappy :(

Crappy? You are being nice...

It's possible :-) You'd think at least the frame relay code, which is pretty important especially in countries like Poland, would get cleaned up by somebody.