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.
struct syncppp *ap;
int err;
- MOD_INC_USE_COUNT;
ap = kmalloc(sizeof(*ap), GFP_KERNEL);
err = -ENOMEM;
if (ap == 0)
out_free:
kfree(ap);
out:
- MOD_DEC_USE_COUNT;
return err;
}
if (ap->tpkt != 0)
kfree_skb(ap->tpkt);
kfree(ap);
- MOD_DEC_USE_COUNT;
}
/*
static struct tty_ldisc ppp_sync_ldisc = {
+ .owner = THIS_MODULE,
.magic = TTY_LDISC_MAGIC,
.name = "pppsync",
.open = ppp_sync_open,