Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6192609iob; Tue, 10 May 2022 12:27:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWAHteUVeP+IUF1Cb8CVCbuDTlRRMFzEIBjCOn/ituHVkTb5Zeqkb1pofo/c906DJqane+ X-Received: by 2002:a65:4185:0:b0:399:4c59:e3b1 with SMTP id a5-20020a654185000000b003994c59e3b1mr17834340pgq.154.1652210863729; Tue, 10 May 2022 12:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652210863; cv=none; d=google.com; s=arc-20160816; b=yQeRkKgcPUXn4QJuAhj0T5GecW2pybgBMThEyp7IRa6Z8zSFUUj7FwltOCWb44BDpI 4ebSoE8b1zLChh0f5pYb3PCQClsGt0xPJM2VCqMlqlH1Vu7PjFEM64xdbWodD7+kubXd BTIcPUUU1U5HZeyYRBqck9J/udn6r7Krw3TlU3wFRwHZ0ewxBO/lVC8eVnPB+OLhBgtR iya6/U6n1qr9OkBfUxh+iMdwCnQ5BDZ77GLZXtF6/Xl3HRvo4g1jUAG+Mwal1MZLhDQq rF1UCWgxZ37VeFdFjVIGgGVYziGJaOrbU4EBjftRCduiiBXUmUXFGELuJMF70cXsq3UE njcw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WFTN6RvkewIrH3hc7gowbZJY9uiQOwdgMF575THLESE=; b=0iSDs9ipZiq8vOShiSAlD3xD8dt0qNGuMU3mqi8ZKSwTCBUNG5MXo4F0QBKxDtkJSB SjMwhmsOWdHZNF4+/Q1dM5xEPfark8OFt17/zKDvwjgB4FxjVy1Ii1AQMAJcDmliWOmM 6dJqcrh5KeajB5mjXrC5jSHRGmAu1JeXejW+PqzYg9DV6NL734Furj3SnkTR6hKjB/8W CamXtnM4YZc7/06HHprUAp90x0wo3viJlGNozP0ewXfOCo4nxO/33ytwSeEf8bVd+TMo nUTXwG4emasBbz5Rt3iipLd5ZnLY6HmnWNNcQCHFYsILtMyq7RfXCbk4VWNLZXq82TCy AAKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L6EPd0xf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a170902c40300b00153b2d1652csi5022014plk.308.2022.05.10.12.27.28; Tue, 10 May 2022 12:27:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L6EPd0xf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239912AbiEJOCG (ORCPT + 99 others); Tue, 10 May 2022 10:02:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244708AbiEJNh6 (ORCPT ); Tue, 10 May 2022 09:37:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 401A7541B0; Tue, 10 May 2022 06:26:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A430DB81DB2; Tue, 10 May 2022 13:26:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1F76C385A6; Tue, 10 May 2022 13:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652189172; bh=5qPkci4CbwwNJ8yxDYOjaGBrDEOA1cevvZaRdZmsFWc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L6EPd0xfyLY2qEEl359HkzL3XeXExQmU30AcXDV00RC/8Z4VS65zrEykXnuGKRmK0 mt1LKzbNKM2t5GSv7WrEAez4kwdMw/YvnwtaSY3cAsEefNJtE3uvgVK/Laqhowtdux eFcLMk1gGKRu9mMeCaiPfjAHSTxjIkGcw9/Dfw0Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sascha Hauer , Codrin Ciubotariu , Mark Brown Subject: [PATCH 5.10 36/70] ASoC: dmaengine: Restore NULL prepare_slave_config() callback Date: Tue, 10 May 2022 15:07:55 +0200 Message-Id: <20220510130733.922122741@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.861729621@linuxfoundation.org> References: <20220510130732.861729621@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 From: Codrin Ciubotariu commit 660564fc9a92a893a14f255be434f7ea0b967901 upstream. As pointed out by Sascha Hauer, this patch changes: if (pmc->config && !pcm->config->prepare_slave_config) to: if (pmc->config && !pcm->config->prepare_slave_config) snd_dmaengine_pcm_prepare_slave_config() This breaks the drivers that do not need a call to dmaengine_slave_config(). Drivers that still need to call snd_dmaengine_pcm_prepare_slave_config(), but have a NULL pcm->config->prepare_slave_config should use snd_dmaengine_pcm_prepare_slave_config() as their prepare_slave_config callback. Fixes: 9a1e13440a4f ("ASoC: dmaengine: do not use a NULL prepare_slave_config() callback") Reported-by: Sascha Hauer Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20220421125403.2180824-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/soc-generic-dmaengine-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -83,10 +83,10 @@ static int dmaengine_pcm_hw_params(struc memset(&slave_config, 0, sizeof(slave_config)); - if (pcm->config && pcm->config->prepare_slave_config) - prepare_slave_config = pcm->config->prepare_slave_config; - else + if (!pcm->config) prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; + else + prepare_slave_config = pcm->config->prepare_slave_config; if (prepare_slave_config) { ret = prepare_slave_config(substream, params, &slave_config);