Hopefully straight forward patch by a newbie. Any comments?
I am clueless with kernel programming. Still, I have came up with the
following - hopefully straight forward - patch. Any comments?
--- ne.c 2006-08-29 14:55:59.000000000 +0300
+++ linux-source-2.6.17/drivers/net/ne.c 2006-08-29 16:02:24.000000000 +0300
@@ -829,7 +829,7 @@
is at boot) and so the probe will get confused by any other 8390 cards.
ISA device autoprobes on a running machine are not recommended anyway. */
-int init_module(void)
+static int __init init_ne_module(void)
{
int this_dev, found = 0;
@@ -867,7 +867,7 @@
release_region(dev->base_addr, NE_IO_EXTENT);
}
-void cleanup_module(void)
+static void __exit cleanup_ne_module(void)
{
int this_dev;
@@ -880,4 +880,8 @@
}
}
}
+
+module_init(init_ne_module);
+module_exit(cleanup_ne_module);
+
#endif /* MODULE */
--- smc-ultra.c 2006-08-29 15:03:33.000000000 +0300
+++ linux-source-2.6.17/drivers/net/smc-ultra.c 2006-08-29 16:08:08.000000000 +0300
@@ -553,8 +553,7 @@
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
-init_module(void)
+static int __init init_smcUltra_module(void)
{
struct net_device *dev;
int this_dev, found = 0;
@@ -594,8 +593,7 @@
iounmap(ei_status.mem);
}
-void
-cleanup_module(void)
+static void __exit cleanup_smcUltra_module(void)
{
int this_dev;
@@ -608,4 +606,8 @@
}
}
}
+
+module_init(init_smcUltra_module);
+module_exit(cleanup_smcUltra_module);
+
#endif /* MODULE */
Reply to: