diff options
author | Andrey Konovalov <andrey.konovalov@linaro.org> | 2013-05-08 22:31:27 +0400 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2013-05-08 22:31:27 +0400 |
commit | 79dbf9d1a443fc015e05dbeb5ab610059c6d9bf1 (patch) | |
tree | 044b23d8cb4827763dc0728dbaa76c4cd0eb7ac2 /drivers/tty | |
parent | de507154419bcaf3c135b94ba3bbb3f3a6464447 (diff) | |
parent | c554f06fc801004f3fc3b162c490d8fdf4e79725 (diff) |
Merge branch 'tracking-linux-3.9.y' into merge-linux-linaro-core-trackingllct-20130508.0
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/pty.c | 3 | ||||
-rw-r--r-- | drivers/tty/serial/serial_core.c | 4 | ||||
-rw-r--r-- | drivers/tty/tty_io.c | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index c24b4db243b9..125e0fd06746 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -682,6 +682,9 @@ static int ptmx_open(struct inode *inode, struct file *filp) nonseekable_open(inode, filp); + /* We refuse fsnotify events on ptmx, since it's a shared resource */ + filp->f_mode |= FMODE_NONOTIFY; + retval = tty_alloc_file(filp); if (retval) return retval; diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 381d815b9904..88a5ee744bde 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1944,6 +1944,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) mutex_unlock(&port->mutex); return 0; } + put_device(tty_dev); + if (console_suspend_enabled || !uart_console(uport)) uport->suspended = 1; @@ -2009,9 +2011,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) disable_irq_wake(uport->irq); uport->irq_wake = 0; } + put_device(tty_dev); mutex_unlock(&port->mutex); return 0; } + put_device(tty_dev); uport->suspended = 0; /* diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index b0452688308c..a9cd0b9353d3 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -941,10 +941,10 @@ void start_tty(struct tty_struct *tty) EXPORT_SYMBOL(start_tty); +/* We limit tty time update visibility to every 8 seconds or so. */ static void tty_update_time(struct timespec *time) { - unsigned long sec = get_seconds(); - sec -= sec % 60; + unsigned long sec = get_seconds() & ~7; if ((long)(sec - time->tv_sec) > 0) time->tv_sec = sec; } |