diff options
| author | Hanna V. Linder <hannal@us.ibm.com> | 2003-05-07 01:02:02 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-05-07 01:02:02 -0700 |
| commit | 60bac5c2d8360d34f65abb5c57eb58ad321e784b (patch) | |
| tree | 5b0f7e487c82707f2ba42736dbe4ccf34bbbd91e | |
| parent | 5fa62d1f2e4ad8ec1da9ecc2f9d0bdcf7f841c3e (diff) | |
[PATCH] isdn/capi tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
| -rw-r--r-- | drivers/isdn/capi/capi.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 0e9f6b3003fd..49e7076430c8 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -200,10 +200,8 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) unsigned int minor = 0; unsigned long flags; - MOD_INC_USE_COUNT; mp = kmalloc(sizeof(*mp), GFP_ATOMIC); if (!mp) { - MOD_DEC_USE_COUNT; printk(KERN_ERR "capi: can't alloc capiminor\n"); return 0; } @@ -249,7 +247,6 @@ static void capiminor_free(struct capiminor *mp) skb_queue_purge(&mp->outqueue); capiminor_del_all_ack(mp); kfree(mp); - MOD_DEC_USE_COUNT; } struct capiminor *capiminor_find(unsigned int minor) @@ -1280,6 +1277,7 @@ static int capinc_tty_init(void) memset(drv, 0, sizeof(struct tty_driver)); drv->magic = TTY_DRIVER_MAGIC; + drv->owner = THIS_MODULE; drv->driver_name = "capi_nc"; drv->name = "capi/"; drv->major = capi_ttymajor; @@ -1460,7 +1458,6 @@ static int __init capi_init(void) char *p; char *compileinfo; - MOD_INC_USE_COUNT; if ((p = strchr(revision, ':')) != 0 && p[1]) { strncpy(rev, p + 2, sizeof(rev)); @@ -1472,7 +1469,6 @@ static int __init capi_init(void) if (register_chrdev(capi_major, "capi20", &capi_fops)) { printk(KERN_ERR "capi20: unable to get major %d\n", capi_major); - MOD_DEC_USE_COUNT; return -EIO; } @@ -1484,7 +1480,6 @@ static int __init capi_init(void) #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE if (capinc_tty_init() < 0) { unregister_chrdev(capi_major, "capi20"); - MOD_DEC_USE_COUNT; return -ENOMEM; } #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ @@ -1503,7 +1498,6 @@ static int __init capi_init(void) printk(KERN_NOTICE "capi20: Rev %s: started up with major %d%s\n", rev, capi_major, compileinfo); - MOD_DEC_USE_COUNT; return 0; } |
