Commit 0c65a1c2 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-serial

into home.osdl.org:/home/torvalds/v2.5/linux
parents 1974c841 33d176e7
...@@ -529,7 +529,6 @@ static void uart_put_char(struct tty_struct *tty, unsigned char ch) ...@@ -529,7 +529,6 @@ static void uart_put_char(struct tty_struct *tty, unsigned char ch)
{ {
struct uart_state *state = tty->driver_data; struct uart_state *state = tty->driver_data;
if (tty)
__uart_put_char(state->port, &state->info->xmit, ch); __uart_put_char(state->port, &state->info->xmit, ch);
} }
...@@ -545,7 +544,7 @@ uart_write(struct tty_struct *tty, int from_user, const unsigned char * buf, ...@@ -545,7 +544,7 @@ uart_write(struct tty_struct *tty, int from_user, const unsigned char * buf,
struct uart_state *state = tty->driver_data; struct uart_state *state = tty->driver_data;
int ret; int ret;
if (!tty || !state->info->xmit.buf) if (!state->info->xmit.buf)
return 0; return 0;
if (from_user) if (from_user)
...@@ -833,13 +832,17 @@ uart_set_info(struct uart_state *state, struct serial_struct *newinfo) ...@@ -833,13 +832,17 @@ uart_set_info(struct uart_state *state, struct serial_struct *newinfo)
if (state->info->flags & UIF_INITIALIZED) { if (state->info->flags & UIF_INITIALIZED) {
if (((old_flags ^ port->flags) & UPF_SPD_MASK) || if (((old_flags ^ port->flags) & UPF_SPD_MASK) ||
old_custom_divisor != port->custom_divisor) { old_custom_divisor != port->custom_divisor) {
/* If they're setting up a custom divisor or speed, /*
* If they're setting up a custom divisor or speed,
* instead of clearing it, then bitch about it. No * instead of clearing it, then bitch about it. No
* need to rate-limit; it's CAP_SYS_ADMIN only. */ * need to rate-limit; it's CAP_SYS_ADMIN only.
*/
if (port->flags & UPF_SPD_MASK) { if (port->flags & UPF_SPD_MASK) {
printk(KERN_NOTICE "%s sets custom speed on %s%d. This is deprecated.\n", char buf[64];
current->comm, state->info->tty->driver->name, printk(KERN_NOTICE
state->port->line); "%s sets custom speed on %s. This "
"is deprecated.\n", current->comm,
tty_name(state->info->tty, buf));
} }
uart_change_speed(state, NULL); uart_change_speed(state, NULL);
} }
...@@ -1209,9 +1212,15 @@ static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios ...@@ -1209,9 +1212,15 @@ static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios
static void uart_close(struct tty_struct *tty, struct file *filp) static void uart_close(struct tty_struct *tty, struct file *filp)
{ {
struct uart_state *state = tty->driver_data; struct uart_state *state = tty->driver_data;
struct uart_port *port = state->port; struct uart_port *port;
BUG_ON(!kernel_locked()); BUG_ON(!kernel_locked());
if (!state || !state->port)
return;
port = state->port;
DPRINTK("uart_close(%d) called\n", port->line); DPRINTK("uart_close(%d) called\n", port->line);
down(&state->sem); down(&state->sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment