From: Thierry Reding <thierry.reding@avionic-design.de>
To: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>, Stephen Warren <swarren@nvidia.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] serial: tegra: Switch to using struct tty_port
Date: Thu, 17 Jan 2013 14:31:45 +0100 [thread overview]
Message-ID: <1358429505-31746-1-git-send-email-thierry.reding@avionic-design.de> (raw)
Many of the tty functions were converted to use a struct tty_port
instead of a struct tty_struct. Update the Tegra driver accordingly to
avoid build breakage.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
drivers/tty/serial/serial-tegra.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index cc4072f..30d6ff6 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -504,7 +504,7 @@ static void tegra_uart_handle_tx_pio(struct tegra_uart_port *tup)
}
static void tegra_uart_handle_rx_pio(struct tegra_uart_port *tup,
- struct tty_struct *tty)
+ struct tty_port *tty)
{
do {
char flag = TTY_NORMAL;
@@ -527,7 +527,7 @@ static void tegra_uart_handle_rx_pio(struct tegra_uart_port *tup,
}
static void tegra_uart_copy_rx_to_tty(struct tegra_uart_port *tup,
- struct tty_struct *tty, int count)
+ struct tty_port *tty, int count)
{
int copied;
@@ -554,6 +554,7 @@ static void tegra_uart_rx_dma_complete(void *args)
struct uart_port *u = &tup->uport;
int count = tup->rx_bytes_requested;
struct tty_struct *tty = tty_port_tty_get(&tup->uport.state->port);
+ struct tty_port *port = &u->state->port;
unsigned long flags;
async_tx_ack(tup->rx_dma_desc);
@@ -565,11 +566,11 @@ static void tegra_uart_rx_dma_complete(void *args)
/* If we are here, DMA is stopped */
if (count)
- tegra_uart_copy_rx_to_tty(tup, tty, count);
+ tegra_uart_copy_rx_to_tty(tup, port, count);
- tegra_uart_handle_rx_pio(tup, tty);
+ tegra_uart_handle_rx_pio(tup, port);
if (tty) {
- tty_flip_buffer_push(tty);
+ tty_flip_buffer_push(port);
tty_kref_put(tty);
}
tegra_uart_start_rx_dma(tup);
@@ -585,6 +586,7 @@ static void tegra_uart_handle_rx_dma(struct tegra_uart_port *tup)
{
struct dma_tx_state state;
struct tty_struct *tty = tty_port_tty_get(&tup->uport.state->port);
+ struct tty_port *port = &tup->uport.state->port;
int count;
/* Deactivate flow control to stop sender */
@@ -597,11 +599,11 @@ static void tegra_uart_handle_rx_dma(struct tegra_uart_port *tup)
/* If we are here, DMA is stopped */
if (count)
- tegra_uart_copy_rx_to_tty(tup, tty, count);
+ tegra_uart_copy_rx_to_tty(tup, port, count);
- tegra_uart_handle_rx_pio(tup, tty);
+ tegra_uart_handle_rx_pio(tup, port);
if (tty) {
- tty_flip_buffer_push(tty);
+ tty_flip_buffer_push(port);
tty_kref_put(tty);
}
tegra_uart_start_rx_dma(tup);
@@ -724,6 +726,7 @@ static void tegra_uart_stop_rx(struct uart_port *u)
{
struct tegra_uart_port *tup = to_tegra_uport(u);
struct tty_struct *tty = tty_port_tty_get(&tup->uport.state->port);
+ struct tty_port *port = &u->state->port;
struct dma_tx_state state;
unsigned long ier;
int count;
@@ -747,13 +750,13 @@ static void tegra_uart_stop_rx(struct uart_port *u)
dmaengine_tx_status(tup->rx_dma_chan, tup->rx_cookie, &state);
async_tx_ack(tup->rx_dma_desc);
count = tup->rx_bytes_requested - state.residue;
- tegra_uart_copy_rx_to_tty(tup, tty, count);
- tegra_uart_handle_rx_pio(tup, tty);
+ tegra_uart_copy_rx_to_tty(tup, port, count);
+ tegra_uart_handle_rx_pio(tup, port);
} else {
- tegra_uart_handle_rx_pio(tup, tty);
+ tegra_uart_handle_rx_pio(tup, port);
}
if (tty) {
- tty_flip_buffer_push(tty);
+ tty_flip_buffer_push(port);
tty_kref_put(tty);
}
return;
--
1.8.1.1
next reply other threads:[~2013-01-17 13:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 13:31 Thierry Reding [this message]
2013-01-17 17:07 ` Stephen Warren
2013-01-17 17:34 ` Laxman Dewangan
2013-01-18 8:37 ` Thierry Reding
2013-01-18 15:49 ` Laxman Dewangan
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=1358429505-31746-1-git-send-email-thierry.reding@avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@nvidia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®