From patchwork Sat Sep 12 13:02:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 53515 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id C74F322B26 for ; Sat, 12 Sep 2015 13:03:55 +0000 (UTC) Received: by lamp12 with SMTP id p12sf34083783lam.2 for ; Sat, 12 Sep 2015 06:03:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=8QUzxEcugnTUYQKgL7pJzTPzkR9TnI/r4k7LvHwv4ww=; b=XlIDs+4JwFGHLjFpRx+GJwlJdb7h0JgnwhsHS6ZN3dr4mmrTaIb5N8aLjuktb3TWY2 ZUb5oxHzdWKKgMuuPzALzJcz25UcyoUHKZqk3eXtpR8pv7EeXDE1C3h4zZLzORWZrIEU Qk8z+ObsT7ySXVdG3zKSx2ys4AkkxqUPmCYtH3SILkz5ebAnEEFGTD6/C3LmE+4NrVS7 Mj+J8a5xnIuS8qWO64U02OUgyGsaudrtvHUrLEVKvIKCd9h5Dc/gwvXkqDq6pel+nFrD NYP2EhlGbhS2wclU0F2cm587ddv5pil/vAE2f2EzOy9OmIePkTqUoumypP47y7z5zZ6v SAVw== X-Gm-Message-State: ALoCoQkRy0wZLA2KfzTFrOokBZBFb03hBVz+QXSGib6GBUnCXC4HJPEOWrGS2U+5vr+SitSXIyp+ X-Received: by 10.180.210.71 with SMTP id ms7mr463745wic.4.1442063034776; Sat, 12 Sep 2015 06:03:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.229 with SMTP id z5ls445754lal.8.gmail; Sat, 12 Sep 2015 06:03:54 -0700 (PDT) X-Received: by 10.152.170.230 with SMTP id ap6mr3681649lac.73.1442063034569; Sat, 12 Sep 2015 06:03:54 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id so9si3237443lbb.137.2015.09.12.06.03.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Sep 2015 06:03:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lahg1 with SMTP id g1so32668317lah.1 for ; Sat, 12 Sep 2015 06:03:54 -0700 (PDT) X-Received: by 10.112.72.97 with SMTP id c1mr3697607lbv.86.1442063034361; Sat, 12 Sep 2015 06:03:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp230972lbq; Sat, 12 Sep 2015 06:03:53 -0700 (PDT) X-Received: by 10.66.62.202 with SMTP id a10mr9944144pas.42.1442063029387; Sat, 12 Sep 2015 06:03:49 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bb1si6543820pbc.105.2015.09.12.06.03.48; Sat, 12 Sep 2015 06:03:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754768AbbILNDq (ORCPT + 7 others); Sat, 12 Sep 2015 09:03:46 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:33386 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754748AbbILNCm (ORCPT ); Sat, 12 Sep 2015 09:02:42 -0400 Received: by wiclk2 with SMTP id lk2so91571239wic.0 for ; Sat, 12 Sep 2015 06:02:41 -0700 (PDT) X-Received: by 10.180.218.103 with SMTP id pf7mr6436178wic.6.1442062961242; Sat, 12 Sep 2015 06:02:41 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id v6sm5464912wjf.13.2015.09.12.06.02.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Sep 2015 06:02:40 -0700 (PDT) From: "Ivan T. Ivanov" To: Andy Gross Cc: David Brown , Greg Kroah-Hartman , Jiri Slaby , Frank Rowand , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH 4/7] tty: serial: msm: Add msm prefix to all driver functions Date: Sat, 12 Sep 2015 16:02:11 +0300 Message-Id: <1442062934-13449-5-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442062934-13449-1-git-send-email-ivan.ivanov@linaro.org> References: <1442062934-13449-1-git-send-email-ivan.ivanov@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.ivanov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Make function naming consistent across this driver. No functional changes. Signed-off-by: Ivan T. Ivanov Reviewed-by: Stephen Boyd --- drivers/tty/serial/msm_serial.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index d08cfd3e1c3a..1c2a02634853 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -57,7 +57,7 @@ struct msm_port { bool break_detected; }; -static inline void wait_for_xmitr(struct uart_port *port) +static inline void msm_wait_for_xmitr(struct uart_port *port) { while (!(msm_read(port, UART_SR) & UART_SR_TX_EMPTY)) { if (msm_read(port, UART_ISR) & UART_ISR_TX_READY) @@ -99,7 +99,7 @@ static void msm_enable_ms(struct uart_port *port) msm_write(port, msm_port->imr, UART_IMR); } -static void handle_rx_dm(struct uart_port *port, unsigned int misr) +static void msm_handle_rx_dm(struct uart_port *port, unsigned int misr) { struct tty_port *tport = &port->state->port; unsigned int sr; @@ -171,7 +171,7 @@ static void handle_rx_dm(struct uart_port *port, unsigned int misr) msm_write(port, UART_CR_CMD_STALE_EVENT_ENABLE, UART_CR); } -static void handle_rx(struct uart_port *port) +static void msm_handle_rx(struct uart_port *port) { struct tty_port *tport = &port->state->port; unsigned int sr; @@ -224,14 +224,14 @@ static void handle_rx(struct uart_port *port) spin_lock(&port->lock); } -static void reset_dm_count(struct uart_port *port, int count) +static void msm_reset_dm_count(struct uart_port *port, int count) { - wait_for_xmitr(port); + msm_wait_for_xmitr(port); msm_write(port, count, UARTDM_NCF_TX); msm_read(port, UARTDM_NCF_TX); } -static void handle_tx(struct uart_port *port) +static void msm_handle_tx(struct uart_port *port) { struct circ_buf *xmit = &port->state->xmit; struct msm_port *msm_port = UART_TO_MSM(port); @@ -250,13 +250,13 @@ static void handle_tx(struct uart_port *port) if (port->x_char) { if (msm_port->is_uartdm) - reset_dm_count(port, tx_count + 1); + msm_reset_dm_count(port, tx_count + 1); iowrite8_rep(tf, &port->x_char, 1); port->icount.tx++; port->x_char = 0; } else if (tx_count && msm_port->is_uartdm) { - reset_dm_count(port, tx_count); + msm_reset_dm_count(port, tx_count); } while (tf_pointer < tx_count) { @@ -290,7 +290,7 @@ static void handle_tx(struct uart_port *port) uart_write_wakeup(port); } -static void handle_delta_cts(struct uart_port *port) +static void msm_handle_delta_cts(struct uart_port *port) { msm_write(port, UART_CR_CMD_RESET_CTS, UART_CR); port->icount.cts++; @@ -314,14 +314,14 @@ static irqreturn_t msm_irq(int irq, void *dev_id) if (misr & (UART_IMR_RXLEV | UART_IMR_RXSTALE)) { if (msm_port->is_uartdm) - handle_rx_dm(port, misr); + msm_handle_rx_dm(port, misr); else - handle_rx(port); + msm_handle_rx(port); } if (misr & UART_IMR_TXLEV) - handle_tx(port); + msm_handle_tx(port); if (misr & UART_IMR_DELTA_CTS) - handle_delta_cts(port); + msm_handle_delta_cts(port); msm_write(port, msm_port->imr, UART_IMR); /* restore interrupt */ spin_unlock(&port->lock); @@ -779,7 +779,7 @@ static void msm_poll_put_char(struct uart_port *port, unsigned char c) msm_write(port, 0, UART_IMR); if (msm_port->is_uartdm) - reset_dm_count(port, 1); + msm_reset_dm_count(port, 1); /* Wait until FIFO is empty */ while (!(msm_read(port, UART_SR) & UART_SR_TX_READY)) @@ -853,7 +853,7 @@ static struct msm_port msm_uart_ports[] = { #define UART_NR ARRAY_SIZE(msm_uart_ports) -static inline struct uart_port *get_port_from_line(unsigned int line) +static inline struct uart_port *msm_get_port_from_line(unsigned int line) { return &msm_uart_ports[line].uart; } @@ -880,7 +880,7 @@ static void __msm_console_write(struct uart_port *port, const char *s, spin_lock(&port->lock); if (is_uartdm) - reset_dm_count(port, count); + msm_reset_dm_count(port, count); i = 0; while (i < count) { @@ -925,7 +925,7 @@ static void msm_console_write(struct console *co, const char *s, BUG_ON(co->index < 0 || co->index >= UART_NR); - port = get_port_from_line(co->index); + port = msm_get_port_from_line(co->index); msm_port = UART_TO_MSM(port); __msm_console_write(port, s, count, msm_port->is_uartdm); @@ -942,7 +942,7 @@ static int __init msm_console_setup(struct console *co, char *options) if (unlikely(co->index >= UART_NR || co->index < 0)) return -ENXIO; - port = get_port_from_line(co->index); + port = msm_get_port_from_line(co->index); if (unlikely(!port->membase)) return -ENXIO; @@ -1057,7 +1057,7 @@ static int msm_serial_probe(struct platform_device *pdev) dev_info(&pdev->dev, "msm_serial: detected port #%d\n", line); - port = get_port_from_line(line); + port = msm_get_port_from_line(line); port->dev = &pdev->dev; msm_port = UART_TO_MSM(port);