patch-2.1.30 linux/net/rose/rose_dev.c

Next file: linux/net/rose/rose_link.c
Previous file: linux/net/rose/af_rose.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.29/linux/net/rose/rose_dev.c linux/net/rose/rose_dev.c
@@ -145,10 +145,11 @@
 
 static int rose_open(struct device *dev)
 {
-	MOD_INC_USE_COUNT;
 	dev->tbusy = 0;
 	dev->start = 1;
 
+	MOD_INC_USE_COUNT;
+
 	ax25_listen_register((ax25_address *)dev->dev_addr, NULL);
 
 	return 0;
@@ -156,9 +157,10 @@
 
 static int rose_close(struct device *dev)
 {
-	MOD_DEC_USE_COUNT;
 	dev->tbusy = 1;
 	dev->start = 0;
+
+	MOD_DEC_USE_COUNT;
 
 	ax25_listen_release((ax25_address *)dev->dev_addr, NULL);
 

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