From patchwork Fri Jul 11 13:00:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 33490 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D2FE203C0 for ; Fri, 11 Jul 2014 13:02:23 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id ty20sf334601lab.3 for ; Fri, 11 Jul 2014 06:02:22 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=54SIyQByzv3nS3mIoAjjImRa97UsSIY1WTFCKcbuYIs=; b=guIZHZEJ2CGCm6KNEaAH2NTWRhHS3ZuDBrOKsOKDhDl+j2P08muCRYw42co1d7Z64f eXHrB6B8d5HVkaTcJp/po4FkDABnCelpXsDbfd4jpCCwgIuTb8vVMTpfueDiDImsSn91 21f5uI7FtwtfIOfe8SlNqhhz3D7IFqXyr68gc3TOm5F/Pr53PZzjNz9TG78wF8S9j6Lg N9+zii4zrzw44g06kz17RqVONW/r5XqO28omcENSX/m/7++pfaA8pvSpDjwKIfQgFPGU q6/3B/fa/JmVr/v95oWi353lPmpBmzmjxXorWhDk98r0yNsUzf0bXVQ/kWTND1vArvL4 4zmw== X-Gm-Message-State: ALoCoQlyydKK9wubxvXRFsrEHxinNUYdg0Dl7wcV4LwuvgBhZNBcTtFm+MRTcS5K1YVv2XlxEMxV X-Received: by 10.112.167.138 with SMTP id zo10mr289006lbb.20.1405083742083; Fri, 11 Jul 2014 06:02:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.8 with SMTP id v8ls393145qge.15.gmail; Fri, 11 Jul 2014 06:02:21 -0700 (PDT) X-Received: by 10.58.18.144 with SMTP id w16mr710942ved.50.1405083741577; Fri, 11 Jul 2014 06:02:21 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id il7si1462439vec.9.2014.07.11.06.02.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jul 2014 06:02:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hq11so835921vcb.17 for ; Fri, 11 Jul 2014 06:02:21 -0700 (PDT) X-Received: by 10.58.188.199 with SMTP id gc7mr51770005vec.4.1405083741473; Fri, 11 Jul 2014 06:02:21 -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.221.37.5 with SMTP id tc5csp33401vcb; Fri, 11 Jul 2014 06:02:21 -0700 (PDT) X-Received: by 10.70.48.227 with SMTP id p3mr23972808pdn.89.1405083740612; Fri, 11 Jul 2014 06:02:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ok8si2385998pbb.181.2014.07.11.06.02.20; Fri, 11 Jul 2014 06:02:20 -0700 (PDT) Received-SPF: none (google.com: linux-serial-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753611AbaGKNCR (ORCPT + 1 other); Fri, 11 Jul 2014 09:02:17 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:34100 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753373AbaGKNCP (ORCPT ); Fri, 11 Jul 2014 09:02:15 -0400 Received: by mail-wi0-f170.google.com with SMTP id cc10so773539wib.5 for ; Fri, 11 Jul 2014 06:02:12 -0700 (PDT) X-Received: by 10.180.90.132 with SMTP id bw4mr245577wib.42.1405083731310; Fri, 11 Jul 2014 06:02:11 -0700 (PDT) Received: from harvey.bri.st.com (LPuteaux-656-01-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id bx2sm5047816wjb.47.2014.07.11.06.02.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jul 2014 06:02:10 -0700 (PDT) From: Daniel Thompson To: Greg Kroah-Hartman Cc: Daniel Thompson , linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Tobias Klauser , Jiri Slaby , linux-serial@vger.kernel.org, nios2-dev@lists.rocketboards.org Subject: [PATCH] serial: altera: Adopt uart_console_write() Date: Fri, 11 Jul 2014 14:00:11 +0100 Message-Id: <1405083611-13828-1-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-serial-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-serial@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@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.220.172 as permitted sender) smtp.mail=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: , This driver does not currently use uart_console_write() and instead provides is own LF to LFCR conversion in it's console_write() method. We should use the library function instead. Cmopile tested only (with ARCH=arm). Signed-off-by: Daniel Thompson Cc: Tobias Klauser Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Cc: nios2-dev@lists.rocketboards.org --- drivers/tty/serial/altera_uart.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c index 3233766..554e2fa 100644 --- a/drivers/tty/serial/altera_uart.c +++ b/drivers/tty/serial/altera_uart.c @@ -435,7 +435,7 @@ static struct altera_uart altera_uart_ports[CONFIG_SERIAL_ALTERA_UART_MAXPORTS]; #if defined(CONFIG_SERIAL_ALTERA_UART_CONSOLE) -static void altera_uart_console_putc(struct uart_port *port, const char c) +static void altera_uart_console_putc(struct uart_port *port, int c) { while (!(altera_uart_readl(port, ALTERA_UART_STATUS_REG) & ALTERA_UART_STATUS_TRDY_MSK)) @@ -449,11 +449,7 @@ static void altera_uart_console_write(struct console *co, const char *s, { struct uart_port *port = &(altera_uart_ports + co->index)->port; - for (; count; count--, s++) { - altera_uart_console_putc(port, *s); - if (*s == '\n') - altera_uart_console_putc(port, '\r'); - } + uart_console_write(port, s, count, altera_uart_console_putc); } static int __init altera_uart_console_setup(struct console *co, char *options)