git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
serial
/
serial_core.c
diff --git
a/drivers/serial/serial_core.c
b/drivers/serial/serial_core.c
index
24ef1cb
..
1ac6c9d
100644
(file)
--- a/
drivers/serial/serial_core.c
+++ b/
drivers/serial/serial_core.c
@@
-107,15
+107,7
@@
static void uart_start(struct tty_struct *tty)
static void uart_tasklet_action(unsigned long data)
{
struct uart_state *state = (struct uart_state *)data;
static void uart_tasklet_action(unsigned long data)
{
struct uart_state *state = (struct uart_state *)data;
- struct tty_struct *tty;
-
- tty = state->info->tty;
- if (tty) {
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- tty->ldisc.write_wakeup(tty);
- wake_up_interruptible(&tty->write_wait);
- }
+ tty_wakeup(state->info->tty);
}
static inline void
}
static inline void
@@
-403,7
+395,7
@@
uart_get_divisor(struct uart_port *port, unsigned int baud)
if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
quot = port->custom_divisor;
else
if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
quot = port->custom_divisor;
else
- quot =
port->uartclk
/ (16 * baud);
+ quot =
(port->uartclk + (8 * baud))
/ (16 * baud);
return quot;
}
return quot;
}
@@
-581,10
+573,7
@@
static void uart_flush_buffer(struct tty_struct *tty)
spin_lock_irqsave(&port->lock, flags);
uart_circ_clear(&state->info->xmit);
spin_unlock_irqrestore(&port->lock, flags);
spin_lock_irqsave(&port->lock, flags);
uart_circ_clear(&state->info->xmit);
spin_unlock_irqrestore(&port->lock, flags);
- wake_up_interruptible(&tty->write_wait);
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
+ tty_wakeup(tty);
}
/*
}
/*
@@
-1216,7
+1205,7
@@
static void uart_close(struct tty_struct *tty, struct file *filp)
{
struct uart_state *state = tty->driver_data;
struct uart_port *port;
{
struct uart_state *state = tty->driver_data;
struct uart_port *port;
-
+
BUG_ON(!kernel_locked());
if (!state || !state->port)
BUG_ON(!kernel_locked());
if (!state || !state->port)
@@
-1239,12
+1228,12
@@
static void uart_close(struct tty_struct *tty, struct file *filp)
* one, we've got real problems, since it means the
* serial port won't be shutdown.
*/
* one, we've got real problems, since it means the
* serial port won't be shutdown.
*/
- printk("uart_close: bad serial port count; tty->count is 1, "
+ printk(
KERN_ERR
"uart_close: bad serial port count; tty->count is 1, "
"state->count is %d\n", state->count);
state->count = 1;
}
if (--state->count < 0) {
"state->count is %d\n", state->count);
state->count = 1;
}
if (--state->count < 0) {
- printk(
"rs
_close: bad serial port count for %s: %d\n",
+ printk(
KERN_ERR "uart
_close: bad serial port count for %s: %d\n",
tty->name, state->count);
state->count = 0;
}
tty->name, state->count);
state->count = 0;
}
@@
-1280,8
+1269,9
@@
static void uart_close(struct tty_struct *tty, struct file *filp)
uart_shutdown(state);
uart_flush_buffer(tty);
uart_shutdown(state);
uart_flush_buffer(tty);
- if (tty->ldisc.flush_buffer)
- tty->ldisc.flush_buffer(tty);
+
+ tty_ldisc_flush(tty);
+
tty->closing = 0;
state->info->tty = NULL;
tty->closing = 0;
state->info->tty = NULL;
@@
-1978,6
+1968,7
@@
uart_report_port(struct uart_driver *drv, struct uart_port *port)
printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6);
break;
case UPIO_MEM:
printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6);
break;
case UPIO_MEM:
+ case UPIO_MEM32:
printk("MMIO 0x%lx", port->mapbase);
break;
}
printk("MMIO 0x%lx", port->mapbase);
break;
}