diff options
| author | Hanna V. Linder <hannal@us.ibm.com> | 2003-05-07 01:01:02 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-05-07 01:01:02 -0700 |
| commit | d8f193da4c65d3e161a33db796bc761f6fc2df76 (patch) | |
| tree | 6236a7cc3c385b0e3d93b647156ce2e47f965df0 | |
| parent | 210a342629ac99961eb1e1aeedf68ec497384d60 (diff) | |
[PATCH] esp tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT
| -rw-r--r-- | drivers/char/esp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/char/esp.c b/drivers/char/esp.c index 614ff9f1e782..24bd70aac2e9 100644 --- a/drivers/char/esp.c +++ b/drivers/char/esp.c @@ -643,9 +643,7 @@ static _INLINE_ void check_modem_status(struct esp_struct *info) #ifdef SERIAL_DEBUG_OPEN printk("scheduling hangup..."); #endif - MOD_INC_USE_COUNT; - if (schedule_task(&info->tqueue_hangup) == 0) - MOD_DEC_USE_COUNT; + schedule_task(&info->tqueue_hangup); } } } @@ -811,7 +809,6 @@ static void do_serial_hangup(void *private_) tty = info->tty; if (tty) tty_hangup(tty); - MOD_DEC_USE_COUNT; } /* @@ -2132,7 +2129,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE| ASYNC_CLOSING); wake_up_interruptible(&info->close_wait); -out: MOD_DEC_USE_COUNT; +out: restore_flags(flags); } @@ -2375,7 +2372,6 @@ static int esp_open(struct tty_struct *tty, struct file * filp) #ifdef SERIAL_DEBUG_OPEN printk("esp_open %s, count = %d\n", tty->name, info->count); #endif - MOD_INC_USE_COUNT; info->count++; tty->driver_data = info; info->tty = tty; @@ -2551,6 +2547,7 @@ int __init espserial_init(void) memset(&esp_driver, 0, sizeof(struct tty_driver)); esp_driver.magic = TTY_DRIVER_MAGIC; + esp_driver.owner = THIS_MODULE; esp_driver.name = "ttyP"; esp_driver.major = ESP_IN_MAJOR; esp_driver.minor_start = 0; |
