From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 305DD2820DE; Wed, 23 Apr 2025 14:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745420308; cv=none; b=Mp0CvbWaRxaetT55RQ7oRKIf81lPz9BAouYwOoq1gt5xZCSiUwUUtQnJZirNrQWeptnmSvxldbKXI27D0gAvQbYyfzhcGtKHhMUyxsYWnNBxyfMUUv3K6kmf+3YQYI6vqg1FJHk2Fw6HfMlWiOLR3hTXyF+drzgLpsfDOHTomYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745420308; c=relaxed/simple; bh=QvtunvrmlwAuPml8K4ifvr9+G4QYDcWnMT+Wm1kCR3E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P7nUQBwHBimXfvZiJPl9CueX689Rfabql+DxgNaplc9rl25XTZZI0SRwmKcAogmUdgGI9EY23iie7dGB7+KkRAIMrRMP0S4GfB3BKD6iGxQDESOZWTKr/DiCDtwpDZV4u/WkA5pmz8FGlz+Vqm0Kjvuktuo6lo2prll4eoC6wRQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FXjCcWxE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FXjCcWxE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6DBFC4CEE2; Wed, 23 Apr 2025 14:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745420308; bh=QvtunvrmlwAuPml8K4ifvr9+G4QYDcWnMT+Wm1kCR3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FXjCcWxEhZRTNXEECD5fuhlxiuCXTY53GstrcztkSAGwL8hQwWc2kypHiFMLl63vm qiBREj8PLnpAzTdQ3PlvAyeh8k30eEu8HWZ/yxjFTHlKATz6VkLcaHcLvJ0iJpsiE8 nmBWn5Em/b4GKp9FrSOj/W6qvFk2E23HgPCOSBGo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Shengjiu Wang , Mark Brown , Sasha Levin Subject: [PATCH 6.6 060/393] ASoC: fsl_audmix: register card device depends on dais property Date: Wed, 23 Apr 2025 16:39:16 +0200 Message-ID: <20250423142645.781109896@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250423142643.246005366@linuxfoundation.org> References: <20250423142643.246005366@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shengjiu Wang [ Upstream commit 294a60e5e9830045c161181286d44ce669f88833 ] In order to make the audmix device linked by audio graph card, make 'dais' property to be optional. If 'dais' property exists, then register the imx-audmix card driver. otherwise, it should be linked by audio graph card. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250226100508.2352568-5-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_audmix.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index 0ab2c19621175..d8e44470f501e 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -492,11 +492,17 @@ static int fsl_audmix_probe(struct platform_device *pdev) goto err_disable_pm; } - priv->pdev = platform_device_register_data(dev, "imx-audmix", 0, NULL, 0); - if (IS_ERR(priv->pdev)) { - ret = PTR_ERR(priv->pdev); - dev_err(dev, "failed to register platform: %d\n", ret); - goto err_disable_pm; + /* + * If dais property exist, then register the imx-audmix card driver. + * otherwise, it should be linked by audio graph card. + */ + if (of_find_property(pdev->dev.of_node, "dais", NULL)) { + priv->pdev = platform_device_register_data(dev, "imx-audmix", 0, NULL, 0); + if (IS_ERR(priv->pdev)) { + ret = PTR_ERR(priv->pdev); + dev_err(dev, "failed to register platform: %d\n", ret); + goto err_disable_pm; + } } return 0; -- 2.39.5