From patchwork Thu Jul 16 18:22:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6810151 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6E778C05AD for ; Thu, 16 Jul 2015 18:22:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A5F5620680 for ; Thu, 16 Jul 2015 18:22:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6C832068E for ; Thu, 16 Jul 2015 18:22:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756242AbbGPSWO (ORCPT ); Thu, 16 Jul 2015 14:22:14 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:34130 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756237AbbGPSWG (ORCPT ); Thu, 16 Jul 2015 14:22:06 -0400 Received: from ayla.of.borg ([84.193.93.87]) by baptiste.telenet-ops.be with bizsmtp id t6N31q0071t5w8s016N3Qu; Thu, 16 Jul 2015 20:22:04 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1ZFnnG-00008E-JY; Thu, 16 Jul 2015 20:22:02 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1ZFnnH-0007MS-Hl; Thu, 16 Jul 2015 20:22:03 +0200 From: Geert Uytterhoeven To: Magnus Damm , Laurent Pinchart , Nobuhiro Iwamatsu , Yoshihiro Kaneko , Kazuya Mizuguchi , Koji Matsuoka , Wolfram Sang , Guennadi Liakhovetski Cc: linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC v2 29/29] serial: sh-sci: Remove schedule_work in sci_dma_rx_complete Date: Thu, 16 Jul 2015 20:22:00 +0200 Message-Id: <1437070920-28069-30-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437070920-28069-1-git-send-email-geert+renesas@glider.be> References: <1437070920-28069-1-git-send-email-geert+renesas@glider.be> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kazuya Mizuguchi This patch calls work_fn_rx() directly so that the driver can avoid executing of next sci_dma_rx_complete() before work_fn_rx() completes. FIXME: Move work_fn_rx() instead of using a forward declaration Signed-off-by: Kazuya Mizuguchi Signed-off-by: Geert Uytterhoeven --- drivers/tty/serial/sh-sci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 27c811351e1bff45..7e8fa3703e5de328 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -128,6 +128,9 @@ struct sci_port { static void sci_start_tx(struct uart_port *port); static void sci_stop_tx(struct uart_port *port); static void sci_start_rx(struct uart_port *port); +#ifdef CONFIG_SERIAL_SH_SCI_DMA +static void work_fn_rx(struct work_struct *work); +#endif #define SCI_NPORTS CONFIG_SERIAL_SH_SCI_NR_UARTS @@ -1364,7 +1367,7 @@ static void sci_dma_rx_complete(void *arg) if (count) tty_flip_buffer_push(&port->state->port); - schedule_work(&s->work_rx); + work_fn_rx(&s->work_rx); } static void sci_rx_dma_release(struct sci_port *s, bool enable_pio)