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 3C77A1917E3; Tue, 29 Apr 2025 17:41:22 +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=1745948482; cv=none; b=Vgr8KffPkyEkqwkW0vmTmKwP57v66nu45xbyxUvYc8PFvPXQN8DYR1rh0Jgj7J5GgF/fngUqrUFPscvLFN2/SA6A9hoDZvRqWd0s889mJ3y6aXWpm6ELpEG2RqY2h5RnVze+7VBrGxDijjQpUa5giZKiolswlspsr6RuEYtJqrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745948482; c=relaxed/simple; bh=XA+DIS2XCPPdh3KLx0qE35R4jSy0vBJCyDyhsp3waEE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NkE1UAFbPV3qWZDS4KDzmSdHZknLMj3EKBjE1aBAPiFVgTC73xpnIrzshm17+1Z9fuML4uAZInEfQNnU8qIgWQkKWVq41BII55HKgCB4jMCwUHPaUE16JW2bfwky9GFaT+ckTBLxXUbfaKyfk9zyKYeT7Njz6Cn3LVrshJT7FWQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dFbUcKIr; 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="dFbUcKIr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2C93C4CEE3; Tue, 29 Apr 2025 17:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745948482; bh=XA+DIS2XCPPdh3KLx0qE35R4jSy0vBJCyDyhsp3waEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dFbUcKIrgg31TztJxev8lhiZP98dypeY7IvYtRw5rwxzMGfq37tclYpENQxvEn50F uw83Sq7jPz15Vd3MHRM1D5hEAPv8YUTGGlz4K2IqYoNzqb+3sCTtckgL9gMXe3DVC9 ZbDGWjrWqHgOJQgV4bG1ZJBdVLRnyod/P5DPxkVY= 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 5.15 021/373] ASoC: fsl_audmix: register card device depends on dais property Date: Tue, 29 Apr 2025 18:38:18 +0200 Message-ID: <20250429161124.005182825@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161123.119104857@linuxfoundation.org> References: <20250429161123.119104857@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 5.15-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 f931288e256ca..9c46b25cc6541 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -500,11 +500,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