From patchwork Sun Nov 19 18:00:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 745333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 614D3C54E76 for ; Sun, 19 Nov 2023 18:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231417AbjKSSBI (ORCPT ); Sun, 19 Nov 2023 13:01:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjKSSBH (ORCPT ); Sun, 19 Nov 2023 13:01:07 -0500 Received: from smtp.smtpout.orange.fr (smtp-20.smtpout.orange.fr [80.12.242.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BAFA115 for ; Sun, 19 Nov 2023 10:01:02 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 4m6NrcUgrFU7r4m6Nraean; Sun, 19 Nov 2023 19:01:00 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1700416860; bh=D9wojedEadZdu2iTbiZJ38zeqMFJAX9Aio1ZOOzrLHE=; h=From:To:Cc:Subject:Date; b=Rt54wfK+C6TaKiaI6K8DP50+lLKnTvR9gQtH11z1DGWEg+NBiU3YVSwh9HufpVqrA CtLpq493ZrCBkJcXqEenO3wLN/9MtPu3lo71Ptr7sELw08fmWKJLY7lGuMIizBuDX3 XoA1YRajEuX6g7pRQaAPQ//87p9ifdeLLn1VK1bp+s2pxoRJSSfciO9viZD5bXrVVg p7RMS4HGtb3Al/YTyjxyQ1XAAwmJF0L9awGvcRfLvwWGte3gWJmbSNn/O+eYq/tySe 8KUhcGlI2i/hyK6+jcFKW/XSm0DrwJp5CNuLAnfcjwIGkDZt+5Wb80JhPTQfEiw/lG OiCAttq3tj6tg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 19 Nov 2023 19:01:00 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-serial@vger.kernel.org Subject: [PATCH] serial: sh-sci: convert not to use dma_request_slave_channel() Date: Sun, 19 Nov 2023 19:00:58 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET --- This patch is NOT compile tested. I've not been able to find a correct setting so that CONFIG_SERIAL_SH_SCI_DMA is set. --- drivers/tty/serial/sh-sci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 84ab434c94ba..b2cc2c1a111e 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1558,10 +1558,9 @@ static struct dma_chan *sci_request_dma_chan(struct uart_port *port, struct dma_slave_config cfg; int ret; - chan = dma_request_slave_channel(port->dev, - dir == DMA_MEM_TO_DEV ? "tx" : "rx"); - if (!chan) { - dev_dbg(port->dev, "dma_request_slave_channel failed\n"); + chan = dma_request_chan(port->dev, dir == DMA_MEM_TO_DEV ? "tx" : "rx"); + if (IS_ERR(chan)) { + dev_dbg(port->dev, "dma_request_chan failed\n"); return NULL; }