patch-2.1.27 linux/net/netrom/nr_dev.c

Next file: linux/net/netrom/nr_route.c
Previous file: linux/net/netrom/af_netrom.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.26/linux/net/netrom/nr_dev.c linux/net/netrom/nr_dev.c
@@ -23,6 +23,8 @@
 
 #include <linux/config.h>
 #if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
+#define __NO_VERSION__
+#include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -173,7 +175,7 @@
 {
 	dev->tbusy = 0;
 	dev->start = 1;
-
+	MOD_INC_USE_COUNT;
 	ax25_listen_register((ax25_address *)dev->dev_addr, NULL);
 
 	return 0;
@@ -183,9 +185,8 @@
 {
 	dev->tbusy = 1;
 	dev->start = 0;
-
 	ax25_listen_release((ax25_address *)dev->dev_addr, NULL);
-
+	MOD_DEC_USE_COUNT;
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov