diff options
| -rw-r--r-- | drivers/serial/core.c | 2 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 20 |
2 files changed, 20 insertions, 2 deletions
diff --git a/drivers/serial/core.c b/drivers/serial/core.c index 22d42e3b18e9..84dfbf42b0db 100644 --- a/drivers/serial/core.c +++ b/drivers/serial/core.c @@ -827,7 +827,7 @@ uart_set_info(struct uart_info *info, struct serial_struct *newinfo) port->irq = new_serial.irq; port->uartclk = new_serial.baud_base * 16; - port->flags = new_serial.flags & UPF_FLAGS; + port->flags = new_serial.flags & UPF_CHANGE_MASK; port->custom_divisor = new_serial.custom_divisor; state->close_delay = new_serial.close_delay * HZ / 100; state->closing_wait = new_serial.closing_wait * HZ / 100; diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 84e021607be9..8c8ea22c9edc 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -179,7 +179,7 @@ struct uart_port { #define UPF_RESOURCES (1 << 30) #define UPF_IOREMAP (1 << 31) -#define UPF_FLAGS (0x7fff) +#define UPF_CHANGE_MASK (0x7fff) #define UPF_USR_MASK (UPF_SPD_MASK|UPF_LOW_LATENCY) unsigned int mctrl; /* current modem ctrl settings */ @@ -275,12 +275,30 @@ struct uart_driver { }; void uart_write_wakeup(struct uart_port *port); + +/* + * Baud rate helpers. + */ +void uart_update_timeout(struct uart_port *port, unsigned int cflag, + unsigned int quot); +unsigned int uart_get_baud_rate(struct uart_port *port, + struct termios *termios); +unsigned int uart_get_divisor(struct uart_port *port, struct termios *termios, + struct termios *old_termios); + +/* + * Console helpers. + */ struct uart_port *uart_get_console(struct uart_port *ports, int nr, struct console *c); void uart_parse_options(char *options, int *baud, int *parity, int *bits, int *flow); int uart_set_options(struct uart_port *port, struct console *co, int baud, int parity, int bits, int flow); + +/* + * Port/driver registration/removal + */ int uart_register_driver(struct uart_driver *uart); void uart_unregister_driver(struct uart_driver *uart); void uart_unregister_port(struct uart_driver *reg, int line); |
