]> git.neil.brown.name Git - history.git/commitdiff
o ax25: use revised net module infrastructure
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>
Sat, 3 May 2003 00:15:24 +0000 (21:15 -0300)
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>
Sat, 3 May 2003 00:15:24 +0000 (21:15 -0300)
Using sk_set_owner and having THIS_MODULE in the struct proto_ops registered
with the core.

net/ax25/af_ax25.c

index a37fa1c2d75d3b1060478ffe4a7a4675fb0ed284..e1cf71538c281a0ed0b31ed8005f6b19645fc7f2 100644 (file)
@@ -845,6 +845,7 @@ int ax25_create(struct socket *sock, int protocol)
        }
 
        sock_init_data(sock, sk);
+       sk_set_owner(sk, THIS_MODULE);
 
        sk->destruct = ax25_free_sock;
        sock->ops    = &ax25_proto_ops;
@@ -880,6 +881,7 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev)
        }
 
        sock_init_data(NULL, sk);
+       sk_set_owner(sk, THIS_MODULE);
 
        sk->destruct = ax25_free_sock;
        sk->type     = osk->type;
@@ -1913,7 +1915,7 @@ static struct net_proto_family ax25_family_ops = {
 
 static struct proto_ops ax25_proto_ops = {
        .family =       PF_AX25,
-
+       .owner =        THIS_MODULE,
        .release =      ax25_release,
        .bind =         ax25_bind,
        .connect =      ax25_connect,