/* This method gets called from a work queue so that the driver private cleanup ops can sleep (needed for USB at least)  */
static void release_one_tty(struct work_struct *work)
/* This method gets called from a work queue so that the driver private cleanup ops can sleep (needed for USB at least)  */
static void release_one_tty(struct work_struct *work)
{
	struct tty_struct *tty =
		container_of(work, struct tty_struct, hangup_work);
	struct tty_driver *driver = tty->driver;
	if (tty->ops->cleanup)
		tty->ops->cleanup(tty);
	tty->magic = 0;
	tty_driver_kref_put(driver);
	module_put(driver->owner);
	file_list_lock();
	list_del_init(&tty->tty_files);
	file_list_unlock();
	free_tty_struct(tty);
}