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: 166860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1778482vqn; Sun, 19 Nov 2023 10:23:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbf3PMmpsLrShPqt4AYUJGdcrrBNbsetD7PKusLXEBvd0p6YYIfGzy5tBz7lIN8tL+6QkN X-Received: by 2002:a17:90b:4b8d:b0:27d:3f0c:f087 with SMTP id lr13-20020a17090b4b8d00b0027d3f0cf087mr5394149pjb.25.1700418216544; Sun, 19 Nov 2023 10:23:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700418216; cv=none; d=google.com; s=arc-20160816; b=xpWq/d6JjpciJmxlqygd6Glts5jik/UU0yXKZ+xqbwDtf7z20HWLQT3LMWBuyAu/Lw GUUZyqd4v+f/L0JO8KzeYDJxjF85xAQHiU1pLgJfW7R9N6YZ7bj4OtZ26M3bgJAim0gy Ylz8eyrnLaghJf2d5xH98yRSqhSU9PkCxaax7Zbato/CpPUVgfjferg4qmrOq4+0kYAv bMol8he3GlK8DzHfe0GfnsIKDMQKdqsZfalDWk8jyLdjsbGtDc1rY/AisG8F1a1BZoGz bC6MqXXeNAsQ8dqMVyW7tM4ZX9anvQJwrniVqmckmywifPLJ78fH/iA4FgE7A1J2EjaW pj/A== 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=v36kBeiXHBlulGsqm4t8mIM6WVjX9B0mFdYlDs6g1xw=; fh=/IO3IKobf5aMCdxN0tPvNdjcEodOK0qaSRcshvTArvY=; b=ZaSs7/viHwsZmn0cKHh828W4dS6RB984aplhJrEzTT/SmAkN4Zaeu+PJJy8W44n1W1 07YXnqs1TtmVBFTXwLIwpdkg4YByC3MPHa0zlrdm+comRJBbovZlaUSA+oXkLFQ+Iy14 oNYl/QBqpIFLMWIYr4aYdPIhZ9i0MvS+i9LzIJdNimXY5wnEa6htWgVJi8HvBEOnqiTc w7UvTctDfeOxZ8MsBScNXh3qQZlVfOEobZ7ioupSeSNk6slG8T34ASJMpJQf/pJ2BNtR 7RFsP3/JU/cQPcpMw9zHP7OiJ+ZwMMlilbl03V46nNE24balM/USc+/tun2HvTh+bHnb +MOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=fpRScPKM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h3-20020a17090aa88300b00280145d5114si6559262pjq.5.2023.11.19.10.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 10:23:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=fpRScPKM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 3E58980A2646; Sun, 19 Nov 2023 10:23:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229575AbjKSSTY (ORCPT + 99 others); Sun, 19 Nov 2023 13:19:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjKSSTY (ORCPT ); Sun, 19 Nov 2023 13:19:24 -0500 Received: from smtp.smtpout.orange.fr (smtp-22.smtpout.orange.fr [80.12.242.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A2AF103 for ; Sun, 19 Nov 2023 10:19:20 -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 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sun, 19 Nov 2023 10:23:35 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783017732243708602 X-GMAIL-MSGID: 1783017732243708602 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 = {};