From patchwork Sun Nov 19 18:19:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13460644 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 18D99C072A2 for ; Sun, 19 Nov 2023 18:26:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229642AbjKSS0y (ORCPT ); Sun, 19 Nov 2023 13:26:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjKSS0x (ORCPT ); Sun, 19 Nov 2023 13:26:53 -0500 Received: from smtp.smtpout.orange.fr (smtp-22.smtpout.orange.fr [80.12.242.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 78780103 for ; Sun, 19 Nov 2023 10:26:50 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 4mO4rHH6TKXaI4mO4rjQGZ; Sun, 19 Nov 2023 19:19:18 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1700417958; bh=v36kBeiXHBlulGsqm4t8mIM6WVjX9B0mFdYlDs6g1xw=; h=From:To:Cc:Subject:Date; b=fpRScPKMrqKeXhyz4MqvrhJjX0RmIUvFR0GXjoqehVAevah4egLamyLT9klwXEXNh YchO1YhEoHBvQi2X5+LbfCKEkpZESWINA0hM2+e7vunj1qT513QKFJZt5Qrq9EpXFM olernFTY6R99soCBz1fxdCJPjGFdJvI8VmR2ybdueCD6cESG0UhEKw0RyjgSzgzf7O ceedL0Do0vtg7/Phlefjevbw7iW7ctphrG+KB1cEYmlLzGAmExaPxm3O/iW1bwWU3L nwd/6WsY5PqGSrsUcGTxfHel8amSMeRxnYZ4FuepOWv6kLyR3E0d+Ly0xIAjxjWdyn ASPHAaL0PMlYg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 19 Nov 2023 19:19:18 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-sound@vger.kernel.org Subject: [PATCH] ASoC: sh: convert not to use dma_request_slave_channel() Date: Sun, 19 Nov 2023 19:19:14 +0100 Message-Id: <1a837f96f056fa3dcb02a77afa5892d40b354cb1.1700417934.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-sound@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. --- sound/soc/sh/fsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 2ef47aa2c778..84601ba43b7d 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1379,7 +1379,9 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct dev io->chan = dma_request_channel(mask, shdma_chan_filter, (void *)io->dma_id); #else - io->chan = dma_request_slave_channel(dev, is_play ? "tx" : "rx"); + io->chan = dma_request_chan(dev, is_play ? "tx" : "rx"); + if (IS_ERR(io->chan)) + io->chan = NULL; #endif if (io->chan) { struct dma_slave_config cfg = {};