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 3C81C2566DF; Thu, 17 Apr 2025 18:41:10 +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=1744915270; cv=none; b=tMiMlfxuZDrOO+Xzys7OzFz5bmQmnVT4tn+WOeUivwoUJVG9RaeT2+MwbLOsfOF+B6UzvzSpmf0V2hqN0556gBmZeSo+ap49+JjAobI7Wum8rbxcvUzQrM+ETk9BxzIo3EUIFvybsVKIXEVY4fJAiiSymcQL0ac7tFR56qs9bIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744915270; c=relaxed/simple; bh=pEY2zQUq4pZo+pRfxcp1w2BGzAk2xSLeorBfqQFfLcg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cC5pX4YNON+Z2bJsW8dKUMheQjjvAqKlToa2WTA784g3Uw8b2QBBUgjHGSCHVN46nryXBPo40i6Mdwm+w9m8vjRKeL62M/zLiq3zlIw6DW29LhXTN1SPGZjkbfaKp50hU5cjaNUuCBafwh54kW37fEPBwm84uwDpo9jMztT3yhE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xQoRjMw7; 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="xQoRjMw7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC47EC4CEE7; Thu, 17 Apr 2025 18:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744915270; bh=pEY2zQUq4pZo+pRfxcp1w2BGzAk2xSLeorBfqQFfLcg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xQoRjMw7rheQ/ivb94CJkvCG2X/O1PlHh9UIXzvvFNsvyU90DbqK8PkaaK+c7ZEbc prElXxNQ5eHWE9Cf+VnnOy16roE2rOEEZvA6v4DkMhm3vKhox0DFlVXOw456ab86ko MG9dObU9QikFfJNgOHmng/3Ks997mvPCKU620D0c= 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.12 074/393] ASoC: fsl_audmix: register card device depends on dais property Date: Thu, 17 Apr 2025 19:48:03 +0200 Message-ID: <20250417175110.571090146@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250417175107.546547190@linuxfoundation.org> References: <20250417175107.546547190@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.12-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 3cd9a66b70a15..7981d598ba139 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -488,11 +488,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