Commit df3a5c9f authored by Rusty Russell's avatar Rusty Russell Committed by Jeff Garzik

[irda] module refcounts in irlan

parent 4bcb7d97
......@@ -195,8 +195,6 @@ struct irlan_cb {
struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr);
void irlan_close(struct irlan_cb *self);
void irlan_close_tsaps(struct irlan_cb *self);
void irlan_mod_inc_use_count(void);
void irlan_mod_dec_use_count(void);
int irlan_register_netdev(struct irlan_cb *self);
void irlan_ias_register(struct irlan_cb *self, __u8 tsap_sel);
......
......@@ -1180,20 +1180,6 @@ void print_ret_code(__u8 code)
}
}
void irlan_mod_inc_use_count(void)
{
#ifdef MODULE
MOD_INC_USE_COUNT;
#endif
}
void irlan_mod_dec_use_count(void)
{
#ifdef MODULE
MOD_DEC_USE_COUNT;
#endif
}
MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>");
MODULE_DESCRIPTION("The Linux IrDA LAN protocol");
MODULE_LICENSE("GPL");
......
......@@ -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 @@ int irlan_eth_init(struct net_device *dev)
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);
ether_setup(dev);
......@@ -112,8 +114,6 @@ int irlan_eth_open(struct net_device *dev)
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);
......@@ -138,8 +138,6 @@ int irlan_eth_close(struct net_device *dev)
/* Stop device */
netif_stop_queue(dev);
irlan_mod_dec_use_count();
irlan_close_data_channel(self);
irlan_close_tsaps(self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment