From patchwork Sun Nov 19 15:29:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 166822 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1703819vqn; Sun, 19 Nov 2023 07:29:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnj81osD5iVI7h+JqQHt4pGmWJ4dVk8iMBt+9nQi4mGUUS0j/AvzG2yz8yLtYPyqilUR64 X-Received: by 2002:a05:6a20:4323:b0:188:8a66:8e8d with SMTP id h35-20020a056a20432300b001888a668e8dmr3217872pzk.45.1700407796350; Sun, 19 Nov 2023 07:29:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700407796; cv=none; d=google.com; s=arc-20160816; b=fWApPM3WSVB8999onTE1Zl0t1/zEedFZ92kce1ADxOmPdGJqd6ikDx/eDtrfrydduo mJ7YzbJcnRdVyPRODPlq0Fo7HWWv7NUaWinsCHpNePXBx9kcSZmWMrWblh9zr47hK4hE VOn2lbnTQpnsplEX5DOEjTs0PMOSu5cdrcT/a0Bbj/dk6kfk1CSJor7ppxtdoWrpzk7a HzheTbpnquRJdEAPYGeSDPzm/2GlJy6Yp82uMipN0YhVxpnpHompU0vvWjiqxhVaNFcW HoUW5CLMPoFBNud4rl57nBGFZRg+i3HPA32tH7N0DemSLwQbE3xmJMM0j/KGGnZQFxiT D89Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=M/DjUxLaOupRVKEtY71THqnxeBXaH7E/KMuBzoQWOwI=; fh=iRt7H+nQcxp956m/SJ+6X0xiih1dp4S/oJPYAVJxZYQ=; b=oQfTH97OqKPrzX3I5GIlIlFdP5gax/UTozB8Xy3WQk08jr6dcC3qsNo6pKo9E6F0Yi A+kvkVkFTyl6s4CB4e42EkHCnw/BZFY0t4S4nuqRUxOg7Ul1Vfrh7gKuW08Oai1t+tw5 meur6AFKdA1cjiFBO827gtP1ORLtGplBVR/AGjvICoeSMSpxHR54vo6am3Y/GkCa+0zr t4Khklmf4ITZZcvHJH1rAaygPlaByHwbL5arKBzSiZxhAE07nP83YelSoS5wD+XbILkv goBl3xN1Vt7ulTd1mqScS5xAfmPc8OVh/JqW8B7LqGTAO3D13icu1gOwbszAHGL3BpXR 9N6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=WLfHFr8C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id lx4-20020a17090b4b0400b002791e648ceasi6741545pjb.112.2023.11.19.07.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 07:29:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=WLfHFr8C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0674380677E7; Sun, 19 Nov 2023 07:29:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbjKSP3u (ORCPT + 99 others); Sun, 19 Nov 2023 10:29:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbjKSP3t (ORCPT ); Sun, 19 Nov 2023 10:29:49 -0500 Received: from smtp.smtpout.orange.fr (smtp-13.smtpout.orange.fr [80.12.242.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D445C2 for ; Sun, 19 Nov 2023 07:29:45 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 4jjwrvAGSmTW54jjxrDo1w; Sun, 19 Nov 2023 16:29:43 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1700407783; bh=M/DjUxLaOupRVKEtY71THqnxeBXaH7E/KMuBzoQWOwI=; h=From:To:Cc:Subject:Date; b=WLfHFr8CmcnxZBwgBnCX+i0RbqVE6KD2nCYNd42ufdbg0jAS4FXGQ+VrHL3D8TrWr O5y9AjnLcOSvVrk98bz9lppZJUezU9uXY2CBA2oHA0HGyV4s4CQ7EILLGFFZJJpnvJ nLGTwUH9XIshh4f5ykTP7Vuxh4IpznsLFPeN4QLnFHeUON2sQasjc/MyER1UdMJVVo Al9fwij0ysqRukCWM33XLs4pQXgTyIHMZ75jhRdl6mc/W/KfB7GIyjYKtG5DeD+md1 FJnhP/GvzARXDkWYdApHpE4ZLrWDqaCphDaMGqvYusKlxc1PPaUmcNxWtU34UibuLl nUxs09nZvqZRA== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 19 Nov 2023 16:29:43 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Richard Genoud , Greg Kroah-Hartman , Jiri Slaby , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] serial: atmel: convert not to use dma_request_slave_channel() Date: Sun, 19 Nov 2023 16:29:39 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 19 Nov 2023 07:29:54 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783006805860863017 X-GMAIL-MSGID: 1783006805860863017 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 --- drivers/tty/serial/atmel_serial.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 1946fafc3f3e..a58cfaa87f1d 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -1013,14 +1013,18 @@ static int atmel_prepare_tx_dma(struct uart_port *port) struct device *mfd_dev = port->dev->parent; dma_cap_mask_t mask; struct dma_slave_config config; + struct dma_chan *chan; int ret, nent; dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask); - atmel_port->chan_tx = dma_request_slave_channel(mfd_dev, "tx"); - if (atmel_port->chan_tx == NULL) + chan = dma_request_chan(mfd_dev, "tx"); + if (IS_ERR(chan)) { + atmel_port->chan_tx = NULL; goto chan_err; + } + atmel_port->chan_tx = chan; dev_info(port->dev, "using %s for tx DMA transfers\n", dma_chan_name(atmel_port->chan_tx));