patch-2.4.22 linux-2.4.22/net/irda/irlan/irlan_eth.c

Next file: linux-2.4.22/net/irda/irlap_event.c
Previous file: linux-2.4.22/net/irda/iriap_event.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/net/irda/irlan/irlan_eth.c linux-2.4.22/net/irda/irlan/irlan_eth.c
@@ -31,6 +31,7 @@
 #include <linux/inetdevice.h>
 #include <linux/if_arp.h>
 #include <linux/random.h>
+#include <linux/module.h>
 #include <net/arp.h>
 
 #include <net/irda/irda.h>
@@ -61,6 +62,7 @@
 	dev->hard_start_xmit    = irlan_eth_xmit; 
 	dev->get_stats	        = irlan_eth_get_stats;
 	dev->set_multicast_list = irlan_eth_set_multicast_list;
+	SET_MODULE_OWNER(dev);
 
 	/* NETIF_F_DYNALLOC feature was set by irlan_eth_init() and would
 	 * cause the unregister_netdev() to do asynch completion _and_
@@ -122,8 +124,6 @@
 	self->disconnect_reason = 0;
 	irlan_client_wakeup(self, self->saddr, self->daddr);
 
-	irlan_mod_inc_use_count();
-
 	/* Make sure we have a hardware address before we return, so DHCP clients gets happy */
 	interruptible_sleep_on(&self->open_wait);
 	
@@ -148,8 +148,6 @@
 	/* Stop device */
 	netif_stop_queue(dev);
 	
-	irlan_mod_dec_use_count();
-
 	irlan_close_data_channel(self);
 	irlan_close_tsaps(self);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)