]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] module owner for ppp_synctty.c
authorPaul Mackerras <paulus@samba.org>
Sun, 25 May 2003 16:00:05 +0000 (12:00 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Sun, 25 May 2003 16:00:05 +0000 (12:00 -0400)
This patch fixes ppp_synctty.c (used for doing PPP over some synchronous
serial HDLC links) so that it sets the owner field of the tty line
discipline it exports, rather than using MOD_INC/DEC_USE_COUNT.  This
is more or less from Stephen Hemminger.

Please apply.

Thanks,
Paul.

drivers/net/ppp_synctty.c

index c4c6e0d13d4173606eedfcfad5e402fc3e089068..06feb5870fc89b611bc17697112350c0e4365e96 100644 (file)
@@ -202,7 +202,6 @@ ppp_sync_open(struct tty_struct *tty)
        struct syncppp *ap;
        int err;
 
-       MOD_INC_USE_COUNT;
        ap = kmalloc(sizeof(*ap), GFP_KERNEL);
        err = -ENOMEM;
        if (ap == 0)
@@ -236,7 +235,6 @@ ppp_sync_open(struct tty_struct *tty)
  out_free:
        kfree(ap);
  out:
-       MOD_DEC_USE_COUNT;
        return err;
 }
 
@@ -276,7 +274,6 @@ ppp_sync_close(struct tty_struct *tty)
        if (ap->tpkt != 0)
                kfree_skb(ap->tpkt);
        kfree(ap);
-       MOD_DEC_USE_COUNT;
 }
 
 /*
@@ -404,6 +401,7 @@ ppp_sync_wakeup(struct tty_struct *tty)
 
 
 static struct tty_ldisc ppp_sync_ldisc = {
+       .owner  = THIS_MODULE,
        .magic  = TTY_LDISC_MAGIC,
        .name   = "pppsync",
        .open   = ppp_sync_open,