Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6270868iob; Tue, 10 May 2022 14:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLnItmaqO1QGr46m2uVRpusxUwrvexsBNmmuDh56obooUbLFeFIJrJrOxLfoQkwZ4ajeDt X-Received: by 2002:a05:6402:289a:b0:425:d682:105d with SMTP id eg26-20020a056402289a00b00425d682105dmr25882075edb.175.1652218284653; Tue, 10 May 2022 14:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652218284; cv=none; d=google.com; s=arc-20160816; b=i8j0HRjCvLNyKyckut+SmXa2ZXXkvHAfcZESeqgakhC0g+dNXVRbm6e4bNKO/aARqh TxyXjhUXVXMQyS77/qZPSLNZ2WUjJOFPDR3BOr9rkBb13A/vPQAQ48IsW7J/hvUas3Zr lDZKtefce6faEap02PgH5Y5/djI5HM0HTzOFNOWFhrA2jOV9o+qJkzzhwNgeGaTb1rA/ MkU3m27TyVCsDZ1gqRCQFimrffJbElxW3WkRY6xiyF6inq43v5vekWufoE7ppP8j3kpa 7/TyYporogCtSBQTUFR9+X+RpKuklgP2pqT3DkxMbdH1IOCmQ4VKviVrJXz4sIFtljDA bvTQ== 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=PHO6EmAmSMOepc+5TUSTx8p4dvJIrNK/2+rxf8Q3NEM=; b=xeZmWtWdpFBkDp4tJU2i2XOEO5B+r3mcUgBam/4ye/ntY3xhq2jbugyakg44tcu2pE edK30Nu/1ssqRLBuOL/BtTStkt7TqofNtzI539lzrst87n9y+Hy5Ff3PIlVuc3yr5NNz h7IBLilWi6KIuey+9wIe8svhD9i9pYTzGjocAbEMzfOK6A/vksU6fRQCQBDr89rC9Rft HjYr3sLEfpHlaNESqX3DA8mpty9v+BS9ky3X4TSpgeLnYfsrC44qdislBArBuBKutA0x dvQ+vYtqWy5n/oBLYGfNvjJj+Tg1jAj7Vj1e+UGfQdrPUvpfFiHPxvJfENj4GKouCTP3 w6QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oc6aaJWk; 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 dr3-20020a170907720300b006f3ce72ceb7si455695ejc.531.2022.05.10.14.31.00; Tue, 10 May 2022 14:31:24 -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=oc6aaJWk; 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 S242964AbiEJNag (ORCPT + 99 others); Tue, 10 May 2022 09:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243104AbiEJNWz (ORCPT ); Tue, 10 May 2022 09:22:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAB7B1B1844; Tue, 10 May 2022 06:17:09 -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 CD536B81DA0; Tue, 10 May 2022 13:17:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28E03C385C2; Tue, 10 May 2022 13:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652188626; bh=6TDfajJ8pBMh+JcLy099ip64RR+pHVaqJxecjE9Erfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oc6aaJWka96HAvjG6Qu/8EPCrlPllO5wZ5EqWVPJp0EGR5uUJNueAerEbxBv2us0m L9SyeQgH6pgeZ9KVD9C38bSM91qKAvMiuErDzhMc6YQUNWIuUHQUPOKsf/1chDfazH fTYkuW7ZK7pvxeHbNbedoEFRp9Vhm28TjQwCWy5o= 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 4.14 68/78] ASoC: dmaengine: Restore NULL prepare_slave_config() callback Date: Tue, 10 May 2022 15:07:54 +0200 Message-Id: <20220510130734.543705295@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.522479698@linuxfoundation.org> References: <20220510130732.522479698@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 @@ -98,10 +98,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);