[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100729145335.16cea2dc@lxorguk.ukuu.org.uk>
Date: Thu, 29 Jul 2010 14:53:35 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Philippe Langlais <philippe.langlais@...ricsson.com>
Cc: <linux-kernel@...r.kernel.org>, <gregkh@...e.de>,
<ludovic.barre@...ricsson.com>, <vincent.guittot@...ricsson.com>
Subject: Re: [PATCH] U6715 16550A serial driver support
> In 16550A auto-configuration, if the fifo size is 64 then it's an U6 16550A port
That may not be reliable given the other 8250 clones around but looks
generally sane.
> @@ -2238,6 +2254,10 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
> unsigned long flags;
> unsigned int baud, quot;
>
> + /* Possibly call pre_set_termios function. */
> + if (port->pre_set_termios)
> + port->pre_set_termios(port, termios, old);
> +
Ok I think it might be better to have
serial8250_do_set_termios(...)
{
/* Existing set_termios code here */
}
EXPORT_SYMBOL(serial8250_do_set_termios);
serial8250_set_termios(...)
{
if (port->set_termios)
return port->set_termios(...)
else
serial8250_do_set_termions(...)
}
That allows people to wrap it with before/after/both handling, or replace
it entirely.
So in your case it would
my_set_termios()
{
/* pre set termios code here */
return serial8250_do_set_termios();
}
Looks ok to me though - it splits the special bits out from the core
nicely
--
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