o af_irda: remove MOD_{INC,DEC}_USE_COUNT

Now the core networking infrastructure will (finally) do that for the net
protocol families, its just a matter of setting the ->owner field in the
registered struct net_proto_family to THIS_MODULE.
parent 0b9d2c78
...@@ -1132,9 +1132,6 @@ static int irda_create(struct socket *sock, int protocol) ...@@ -1132,9 +1132,6 @@ static int irda_create(struct socket *sock, int protocol)
self->nslots = DISCOVERY_DEFAULT_SLOTS; self->nslots = DISCOVERY_DEFAULT_SLOTS;
self->daddr = DEV_ADDR_ANY; /* Until we get connected */ self->daddr = DEV_ADDR_ANY; /* Until we get connected */
self->saddr = 0x0; /* so IrLMP assign us any link */ self->saddr = 0x0; /* so IrLMP assign us any link */
MOD_INC_USE_COUNT;
return 0; return 0;
} }
...@@ -1177,9 +1174,6 @@ void irda_destroy_socket(struct irda_sock *self) ...@@ -1177,9 +1174,6 @@ void irda_destroy_socket(struct irda_sock *self)
} }
#endif /* CONFIG_IRDA_ULTRA */ #endif /* CONFIG_IRDA_ULTRA */
kfree(self); kfree(self);
MOD_DEC_USE_COUNT;
return;
} }
/* /*
...@@ -2409,6 +2403,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, ...@@ -2409,6 +2403,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
static struct net_proto_family irda_family_ops = { static struct net_proto_family irda_family_ops = {
.family = PF_IRDA, .family = PF_IRDA,
.create = irda_create, .create = irda_create,
.owner = THIS_MODULE,
}; };
static struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = { static struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
......
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