| To: | "David S. Miller" <davem@xxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx> |
|---|---|
| Subject: | [PATCH 2.5.72] ppp_async tty discipline module ref counting |
| From: | Stephen Hemminger <shemminger@xxxxxxxx> |
| Date: | Thu, 19 Jun 2003 15:19:14 -0700 |
| Cc: | netdev@xxxxxxxxxxx, linux-ppp@xxxxxxxxxxxxxxx |
| Organization: | Open Source Development Lab |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Change ppp_async to use the owner field to do the module reference counting
and eliminate the the MOD_INC/DEC calls.
diff -Nru a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
--- a/drivers/net/ppp_async.c Thu Jun 19 15:15:56 2003
+++ b/drivers/net/ppp_async.c Thu Jun 19 15:15:56 2003
@@ -147,7 +147,6 @@
struct asyncppp *ap;
int err;
- MOD_INC_USE_COUNT;
err = -ENOMEM;
ap = kmalloc(sizeof(*ap), GFP_KERNEL);
if (ap == 0)
@@ -183,7 +182,6 @@
out_free:
kfree(ap);
out:
- MOD_DEC_USE_COUNT;
return err;
}
@@ -223,7 +221,6 @@
if (ap->tpkt != 0)
kfree_skb(ap->tpkt);
kfree(ap);
- MOD_DEC_USE_COUNT;
}
/*
@@ -351,6 +348,7 @@
static struct tty_ldisc ppp_ldisc = {
+ .owner = THIS_MODULE,
.magic = TTY_LDISC_MAGIC,
.name = "ppp",
.open = ppp_asynctty_open,
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2.5.72] mark assert error cases in skbuff unlikely, David S. Miller |
|---|---|
| Next by Date: | Re: Flow cache flush oops, Herbert Xu |
| Previous by Thread: | [PATCH 2.5.72] mark assert error cases in skbuff unlikely, Stephen Hemminger |
| Next by Thread: | Red: e100-3.0.0_dev8 "Minneapolis Moline" releas, Xose Vazquez Perez |
| Indexes: | [Date] [Thread] [Top] [All Lists] |