]> git.neil.brown.name Git - history.git/commitdiff
[NET]: Fix ppp_async tty discipline module ref counting.
authorDavid S. Miller <davem@nuts.ninka.net>
Thu, 19 Jun 2003 11:49:31 +0000 (04:49 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Thu, 19 Jun 2003 11:49:31 +0000 (04:49 -0700)
drivers/net/ppp_async.c

index 3cf67051e9656610ac41eb28fa5074827fa5a8d8..5edde59242059ce88077f7726edc250bc19621d9 100644 (file)
@@ -147,7 +147,6 @@ ppp_asynctty_open(struct tty_struct *tty)
        struct asyncppp *ap;
        int err;
 
-       MOD_INC_USE_COUNT;
        err = -ENOMEM;
        ap = kmalloc(sizeof(*ap), GFP_KERNEL);
        if (ap == 0)
@@ -183,7 +182,6 @@ ppp_asynctty_open(struct tty_struct *tty)
  out_free:
        kfree(ap);
  out:
-       MOD_DEC_USE_COUNT;
        return err;
 }
 
@@ -223,7 +221,6 @@ ppp_asynctty_close(struct tty_struct *tty)
        if (ap->tpkt != 0)
                kfree_skb(ap->tpkt);
        kfree(ap);
-       MOD_DEC_USE_COUNT;
 }
 
 /*
@@ -351,6 +348,7 @@ ppp_asynctty_wakeup(struct tty_struct *tty)
 
 
 static struct tty_ldisc ppp_ldisc = {
+       .owner  = THIS_MODULE,
        .magic  = TTY_LDISC_MAGIC,
        .name   = "ppp",
        .open   = ppp_asynctty_open,