All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Ley Foon Tan <lftan@altera.com>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: [PATCH 1/3] serial: 8250: Allow probe drivers to ignore tx_loadsz
Date: Mon, 25 Mar 2013 13:34:44 +0200	[thread overview]
Message-ID: <1364211286-31611-2-git-send-email-heikki.krogerus@linux.intel.com> (raw)
In-Reply-To: <1364211286-31611-1-git-send-email-heikki.krogerus@linux.intel.com>

In most cases the tx_loadsz is the same as fifosize. This
will store the fifosize in it if it was not separately
delivered from the driver.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/tty/serial/8250/8250.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index cf6a538..19ebbdf 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
@@ -3247,6 +3247,10 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
 		uart->tx_loadsz		= up->tx_loadsz;
 		uart->capabilities	= up->capabilities;
 
+		/* Take tx_loadsz from fifosize if it wasn't set separately */
+		if (uart->port.fifosize && !uart->tx_loadsz)
+			uart->tx_loadsz = uart->port.fifosize;
+
 		if (up->port.dev)
 			uart->port.dev = up->port.dev;
 
-- 
1.7.10.4


  reply	other threads:[~2013-03-25 11:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25 11:34 [PATCH 0/3] serial: of_serial: new properties Heikki Krogerus
2013-03-25 11:34 ` Heikki Krogerus [this message]
2013-03-25 11:34 ` [PATCH 2/3] serial: of_serial: Handle fifo-size property Heikki Krogerus
2013-03-25 11:38   ` Arnd Bergmann
2013-03-25 11:34 ` [PATCH 3/3] serial: of_serial: Handle hw-flow-control property Heikki Krogerus
2013-03-25 11:40   ` Arnd Bergmann
2013-03-25 12:28     ` Heikki Krogerus
2013-03-25 12:47       ` Arnd Bergmann
2013-03-25 12:57         ` Heikki Krogerus
2013-03-25 13:04           ` Arnd Bergmann
2013-03-25 13:17             ` Heikki Krogerus
2013-03-25 13:51               ` [PATCHv2 3/3] serial: of_serial: Handle auto-flow-control property Heikki Krogerus
2013-03-25 13:53                 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364211286-31611-2-git-send-email-heikki.krogerus@linux.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=lftan@altera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.