From patchwork Thu Jan 17 13:31:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 213263 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CEF762C0082 for ; Fri, 18 Jan 2013 00:32:38 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753778Ab3AQNch (ORCPT ); Thu, 17 Jan 2013 08:32:37 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:64137 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752350Ab3AQNcg (ORCPT ); Thu, 17 Jan 2013 08:32:36 -0500 Received: from mailbox.adnet.avionic-design.de (mailbox.avionic-design.de [109.75.18.3]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MAk71-1ToMf91tHv-00BfaT; Thu, 17 Jan 2013 14:31:49 +0100 Received: from localhost (localhost [127.0.0.1]) by mailbox.adnet.avionic-design.de (Postfix) with ESMTP id A7AC32A2815F; Thu, 17 Jan 2013 14:31:47 +0100 (CET) X-Virus-Scanned: amavisd-new at avionic-design.de Received: from mailbox.adnet.avionic-design.de ([127.0.0.1]) by localhost (mailbox.avionic-design.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mExTSvPI13To; Thu, 17 Jan 2013 14:31:46 +0100 (CET) Received: from mailman.adnet.avionic-design.de (mailman.adnet.avionic-design.de [172.20.31.172]) by mailbox.adnet.avionic-design.de (Postfix) with ESMTP id 427482A28154; Thu, 17 Jan 2013 14:31:46 +0100 (CET) Received: from localhost (avionic-0098.adnet.avionic-design.de [172.20.31.233]) by mailman.adnet.avionic-design.de (Postfix) with ESMTP id 85D9C1003EA; Thu, 17 Jan 2013 14:31:42 +0100 (CET) From: Thierry Reding To: Alan Cox Cc: Greg Kroah-Hartman , Jiri Slaby , Stephen Warren , Laxman Dewangan , 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 Message-Id: <1358429505-31746-1-git-send-email-thierry.reding@avionic-design.de> X-Mailer: git-send-email 1.8.1.1 X-Provags-ID: V02:K0:h/EjR3aHIbqfyIaxsO4VdnddOa3kIQUJ7UJLlH8+KHM GTuFCBJ5w+U+M5Qa3D1g92uNUPCsP4PjbWEXI66I2l/wq0PQpY Y3yyqgRW5eFjOWPP41cdxgSsFHOmolqplRK7LTqxBqcKRJB5nu BjzQdHsrwyXutpIcp5tePYRs47GwUAtDpDfLez/fFmQZ+rbQSI 87LUVt/Mhm7ULhfWp+QwZH9872JsqoxQjpeX8QF+FusseMIhLB gIGri01nFmNAZAJCC0unls6tiYykvRFwXHyEo+cnLcVG2MtFNu F4qh/53OxYHnokaXuXNAtKSjfy/H4EqcO99+0pOkeQyZ2neRUo qdySY5bk4r8+e6bvsw/bkSzdHNPlTKGG5bKdQzHJfitAk4CO5w Plh+QAr4xKhp5exaY2tzBEN/HMfahrFMqYMp/OelufAIMKVOwS Z9zIX Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org 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 Acked-By: Laxman Dewangan --- 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;