From: Hans Grobler (terhi.victor@logonet.com)
Date: Fri Dec 08 2000 - 19:40:56 EET
patch version 1:
- yam_init,init_module,cleanup_module: converted to use new linux2.4
module definition format.
- free_mcs: merged into yam_cleanup_driver (and get rid of conditional
compile flag)
- irqs array: removed unnecessary variable
diff -u3Nr -X dontdiff linux-2.4.0-test12-pre7.orig/drivers/net/hamradio/yam.c linux-2.4.0-test12-pre7/drivers/net/hamradio/yam.c
--- linux-2.4.0-test12-pre7.orig/drivers/net/hamradio/yam.c Thu May 4 20:31:21 2000
+++ linux-2.4.0-test12-pre7/drivers/net/hamradio/yam.c Fri Dec 8 19:29:28 2000
@@ -162,8 +162,6 @@
static struct yam_mcs *yam_data = NULL;
-static unsigned irqs[16];
-
static char ax25_bcast[7] =
{'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, '0' << 1};
static char ax25_test[7] =
@@ -357,19 +355,6 @@
return 0;
}
-#ifdef MODULE
-static void free_mcs(void)
-{
- struct yam_mcs *p;
-
- while (yam_data) {
- p = yam_data;
- yam_data = yam_data->next;
- kfree(p);
- }
-}
-#endif
-
static unsigned char *
add_mcs(unsigned char *bits, int bitrate)
{
@@ -1135,15 +1120,14 @@
/* --------------------------------------------------------------------- */
-int __init yam_init(void)
+static int __init yam_init_driver(void)
{
struct net_device *dev;
int i;
printk(yam_drvinfo);
- /* Clears the IRQ table */
- memset(irqs, 0, sizeof(irqs));
+ /* Clears the port table */
memset(yam_ports, 0, sizeof(yam_ports));
for (i = 0; i < NR_PORTS; i++) {
@@ -1179,32 +1163,14 @@
add_timer(&yam_timer);
yam_net_procfs_init();
- return 1;
-}
-
-/* --------------------------------------------------------------------- */
-
-#ifdef MODULE
-
-/*
- * command line settable parameters
- */
-
-
-MODULE_AUTHOR("Frederic Rible F1OAT kqxisivk@sodatsw.cz");
-MODULE_DESCRIPTION("Yam amateur radio modem driver");
-
-int init_module(void)
-{
- int ret = yam_init();
-
- return (ret == 1) ? 0 : ret;
+ return 0;
}
/* --------------------------------------------------------------------- */
-void cleanup_module(void)
+static void __exit yam_cleanup_driver(void)
{
+ struct yam_mcs *p;
int i;
del_timer(&yam_timer);
@@ -1216,9 +1182,22 @@
yam_close(dev);
unregister_netdev(dev);
}
- free_mcs();
+
+ while (yam_data) {
+ p = yam_data;
+ yam_data = yam_data->next;
+ kfree(p);
+ }
+
yam_net_procfs_remove();
}
-#endif /* MODULE */
/* --------------------------------------------------------------------- */
+
+MODULE_AUTHOR("Frederic Rible F1OAT jvu.yhtufw@gods-inc.de");
+MODULE_DESCRIPTION("Yam amateur radio modem driver");
+module_init(yam_init_driver);
+module_exit(yam_cleanup_driver);
+
+/* --------------------------------------------------------------------- */
+
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to lndbore.tevxvqzbf@snrgy.com
This archive was generated by hypermail 2b30 : Fri Dec 08 2000 - 19:41:56 EET