[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090513003451.GB28422@plexity.net>
Date: Wed, 13 May 2009 00:34:51 +0000
From: Deepak Saxena <dsaxena@...xity.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH] 8250: Don't restore NS16550 mode when console suspend
is disabled
On May 12 2009, at 15:00, Linus Torvalds was caught saying:
>
> Hmm. I already applied this, but then after looking closer, I undid that.
> Why? It looks buggy:
>
> > - if (up->capabilities & UART_NATSEMI) {
> > + if ((up->capabilities & UART_NATSEMI) &&
> > + (!uart_console(&up->port) && console_suspend_enabled)) {
> > unsigned char tmp;
>
> Isn't that second test wrong? Should it not be
>
> if ((up->capabilities & UART_NATSEMI) &&
> (console_suspend_enabled || !uart_console(&up->port)) {
>
> instead?
Yep, thinko on my end.
> /*
> * Suspend the uart port unless it's a console.
> *
> * But suspend even consoles if "console_suspend_enabled"
> * is set.
> */
> static inline int do_suspend_uart(struct uart_port *port)
> {
> return console_suspend_enabled || !uart_console(port);
> }
>
> and then make all these things (including the _existing_ cases in
> uart_suspend_port() use that helper function, rather than writing it out.
Sounds good. Alan?
~Deepak
--
In the end, they will not say, "those were dark times," they will ask
"why were their poets silent?" - Bertold Brecht
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists