X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fserial%2Fserial_txx9.c;h=8fcb4c5b9a263b2db8897fe9360dec3943552569;hb=1d6c9649e236caa2e93e3647256216e57172b011;hp=6846a6c38b6d5535784bafd4884a51bbbc2e5be4;hpb=2843483d2eb02ad104edbe8b2429fb6a39d25063;p=linux-2.6-omap-h63xx.git diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index 6846a6c38b6..8fcb4c5b9a2 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c @@ -272,7 +272,7 @@ static void serial_txx9_initialize(struct uart_port *port) static inline void receive_chars(struct uart_txx9_port *up, unsigned int *status) { - struct tty_struct *tty = up->port.info->tty; + struct tty_struct *tty = up->port.info->port.tty; unsigned char ch; unsigned int disr = *status; int max_count = 256; @@ -657,7 +657,15 @@ static void serial_txx9_pm(struct uart_port *port, unsigned int state, unsigned int oldstate) { - if (state == 0) + /* + * If oldstate was -1 this is called from + * uart_configure_port(). In this case do not initialize the + * port now, because the port was already initialized (for + * non-console port) or should not be initialized here (for + * console port). If we initialized the port here we lose + * serial console settings. + */ + if (state == 0 && oldstate != -1) serial_txx9_initialize(port); }