diff options
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 7 | ||||
-rw-r--r-- | drivers/tty/sysrq.c | 2 | ||||
-rw-r--r-- | drivers/tty/tty_io.c | 4 | ||||
-rw-r--r-- | drivers/tty/vt/keyboard.c | 2 |
4 files changed, 5 insertions, 10 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 3dc14dcb01ca..0ead88c5a19a 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -222,16 +222,11 @@ static inline int calculate_baud_abs_diff(struct uart_port *port, unsigned int baud, unsigned int mode) { unsigned int n = port->uartclk / (mode * baud); - int abs_diff; if (n == 0) n = 1; - abs_diff = baud - (port->uartclk / (mode * n)); - if (abs_diff < 0) - abs_diff = -abs_diff; - - return abs_diff; + return abs_diff(baud, port->uartclk / (mode * n)); } /* diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 28127bcb146d..23198e3f1461 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -341,7 +341,7 @@ static const struct sysrq_key_op sysrq_ftrace_dump_op = { static void sysrq_handle_showmem(u8 key) { - show_mem(0, NULL); + show_mem(); } static const struct sysrq_key_op sysrq_showmem_op = { .handler = sysrq_handle_showmem, diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 4f21a21a1fd5..8a94e5a43c6d 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3021,7 +3021,7 @@ void __do_SAK(struct tty_struct *tty) } while_each_pid_task(session, PIDTYPE_SID, p); /* Now kill any processes that happen to have the tty open */ - do_each_thread(g, p) { + for_each_process_thread(g, p) { if (p->signal->tty == tty) { tty_notice(tty, "SAK: killed process %d (%s): by controlling tty\n", task_pid_nr(p), p->comm); @@ -3038,7 +3038,7 @@ void __do_SAK(struct tty_struct *tty) PIDTYPE_SID); } task_unlock(p); - } while_each_thread(g, p); + } read_unlock(&tasklist_lock); put_pid(session); } diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index be8313cdbac3..358f216c6cd6 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -606,7 +606,7 @@ static void fn_scroll_back(struct vc_data *vc) static void fn_show_mem(struct vc_data *vc) { - show_mem(0, NULL); + show_mem(); } static void fn_show_state(struct vc_data *vc) |