diff options
| author | Hanna V. Linder <hannal@us.ibm.com> | 2003-05-07 01:01:32 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-05-07 01:01:32 -0700 |
| commit | 9d76559d60bc811471ce9377365a032efd7e978b (patch) | |
| tree | 594fcc8fdd1ce6a9913edac00fa1de048d741d97 | |
| parent | acf9b7d06e8f0a1f89107086f482fd14a643c5ba (diff) | |
[PATCH] cyclades tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
| -rw-r--r-- | drivers/char/cyclades.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index eb42b54d5646..3a3910c60aa1 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -2579,15 +2579,12 @@ cy_open(struct tty_struct *tty, struct file * filp) int retval, line; unsigned long page; - MOD_INC_USE_COUNT; line = tty->index; if ((line < 0) || (NR_PORTS <= line)){ - MOD_DEC_USE_COUNT; return -ENODEV; } info = &cy_port[line]; if (info->line < 0){ - MOD_DEC_USE_COUNT; return -ENODEV; } @@ -2607,7 +2604,6 @@ cy_open(struct tty_struct *tty, struct file * filp) } else { printk("cyc:Cyclades-Z firmware not yet loaded\n"); } - MOD_DEC_USE_COUNT; return -ENODEV; } #ifdef CONFIG_CYZ_INTR @@ -2803,7 +2799,6 @@ cy_close(struct tty_struct *tty, struct file *filp) CY_LOCK(info, flags); /* If the TTY is being hung up, nothing to do */ if (tty_hung_up_p(filp)) { - MOD_DEC_USE_COUNT; CY_UNLOCK(info, flags); return; } @@ -2834,7 +2829,6 @@ cy_close(struct tty_struct *tty, struct file *filp) info->count = 0; } if (info->count) { - MOD_DEC_USE_COUNT; CY_UNLOCK(info, flags); return; } @@ -2931,7 +2925,6 @@ cy_close(struct tty_struct *tty, struct file *filp) printk(" cyc:cy_close done\n"); #endif - MOD_DEC_USE_COUNT; CY_UNLOCK(info, flags); return; } /* cy_close */ @@ -5494,6 +5487,7 @@ cy_init(void) memset(&cy_serial_driver, 0, sizeof(struct tty_driver)); cy_serial_driver.magic = TTY_DRIVER_MAGIC; + cy_serial_driver.owner = THIS_MODULE; cy_serial_driver.driver_name = "cyclades"; cy_serial_driver.name = "ttyC"; cy_serial_driver.major = CYCLADES_MAJOR; |
