mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.5.71: remove MOD_{INC,DEC}_USE_COUNT from ppp_async
@ 2003-06-16 18:34 Andrey Borzenkov
  0 siblings, 0 replies; only message in thread
From: Andrey Borzenkov @ 2003-06-16 18:34 UTC (permalink / raw)
  To: linux-ppp; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 103 bytes --]

It compiles and runs and does not allow me to unload ppp_async while up and 
running.

regards

-andrey

[-- Attachment #2: 2.5.71-ppp_async.USE_COUNT.patch --]
[-- Type: text/x-diff, Size: 839 bytes --]

--- linux-2.5.71/drivers/net/ppp_async.c.USE_COUNT	2003-06-16 20:43:03.000000000 +0400
+++ linux-2.5.71/drivers/net/ppp_async.c	2003-06-16 21:41:07.000000000 +0400
@@ -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 *tt
 	if (ap->tpkt != 0)
 		kfree_skb(ap->tpkt);
 	kfree(ap);
-	MOD_DEC_USE_COUNT;
 }
 
 /*
@@ -351,6 +348,7 @@ ppp_asynctty_wakeup(struct tty_struct *t
 
 
 static struct tty_ldisc ppp_ldisc = {
+	.owner	= THIS_MODULE,
 	.magic	= TTY_LDISC_MAGIC,
 	.name	= "ppp",
 	.open	= ppp_asynctty_open,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-16 18:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-16 18:34 [PATCH] 2.5.71: remove MOD_{INC,DEC}_USE_COUNT from ppp_async Andrey Borzenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®