info = &dev->mdm.info[tty->index];
if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open"))
return -ENODEV;
- if (!try_module_get(info->owner)) {
- printk(KERN_WARNING "%s: cannot reserve module\n", __func__);
- return -ENODEV;
- }
#ifdef ISDN_DEBUG_MODEM_OPEN
printk(KERN_DEBUG "isdn_tty_open %s, count = %d\n", tty->name,
info->count);
#ifdef ISDN_DEBUG_MODEM_OPEN
printk(KERN_DEBUG "isdn_tty_open return after startup\n");
#endif
- module_put(info->owner);
return retval;
}
retval = isdn_tty_block_til_ready(tty, filp, info);
#ifdef ISDN_DEBUG_MODEM_OPEN
printk(KERN_DEBUG "isdn_tty_open return after isdn_tty_block_til_ready \n");
#endif
- module_put(info->owner);
return retval;
}
#ifdef ISDN_DEBUG_MODEM_OPEN
#ifdef ISDN_DEBUG_MODEM_OPEN
printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n");
#endif
- module_put(info->owner);
return;
}
info->flags |= ASYNC_CLOSING;
info->tty = NULL;
info->ncarrier = 0;
tty->closing = 0;
- module_put(info->owner);
if (info->blocked_open) {
msleep_interruptible(500);
wake_up_interruptible(&info->open_wait);
retval = -ENOMEM;
goto err_unregister;
}
-#endif
-#ifdef MODULE
- info->owner = THIS_MODULE;
#endif
spin_lock_init(&info->readlock);
sprintf(info->last_cause, "0000");
/* Private data (similar to async_struct in <linux/serial.h>) */
typedef struct modem_info {
int magic;
- struct module *owner;
int flags; /* defined in tty.h */
int x_char; /* xon/xoff character */
int mcr; /* Modem control register */