diff options
| author | Takashi Iwai <tiwai@suse.de> | 2014-11-27 12:40:51 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2014-11-27 12:40:51 +0100 |
| commit | acf403ecc4155153e5e2c1640be90fc166e56ba7 (patch) | |
| tree | e9655b84776cec00a4da077f5dd1e336dfd9c7c0 /drivers/tty/tty_io.c | |
| parent | 69eba10e606a80665f8573221fec589430d9d1cb (diff) | |
| parent | b61f90eac1ff9d1b30497e611aba4651d4066706 (diff) | |
Merge branch 'topic/usb-resume' into for-next
Merge the proper mixer resume support for quirk codes.
Diffstat (limited to 'drivers/tty/tty_io.c')
| -rw-r--r-- | drivers/tty/tty_io.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 16a2c0237dd6..0508a1d8e4cd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1709,6 +1709,8 @@ int tty_release(struct inode *inode, struct file *filp) int pty_master, tty_closing, o_tty_closing, do_sleep; int idx; char buf[64]; + long timeout = 0; + int once = 1; if (tty_paranoia_check(tty, inode, __func__)) return 0; @@ -1789,11 +1791,18 @@ int tty_release(struct inode *inode, struct file *filp) if (!do_sleep) break; - printk(KERN_WARNING "%s: %s: read/write wait queue active!\n", - __func__, tty_name(tty, buf)); + if (once) { + once = 0; + printk(KERN_WARNING "%s: %s: read/write wait queue active!\n", + __func__, tty_name(tty, buf)); + } tty_unlock_pair(tty, o_tty); mutex_unlock(&tty_mutex); - schedule(); + schedule_timeout_killable(timeout); + if (timeout < 120 * HZ) + timeout = 2 * timeout + 1; + else + timeout = MAX_SCHEDULE_TIMEOUT; } /* |
