From: Yige Jiang <yigejiang86@gmail.com>
To: linux-sound@vger.kernel.org
Cc: Yige Jiang <yigejiang86@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH] ASoC: cpcap: use the platform OF node setter
Date: Thu, 5 Nov 2026 01:53:26 +0800 [thread overview]
Message-ID: <rc-review-20261103-28-afc55c614a25@gmail.com> (raw)
cpcap_codec_probe() gets the audio-codec child node and assigns it
only to dev.of_node. Platform device release now puts dev.fwnode,
so the acquired node reference is never returned.
Use platform_device_set_of_node() to synchronize both fields and
give the device its own reference, then put the local lookup
reference. The device keeps the node until it is replaced or the
platform device is released; a probe retry also drops the old
device-owned reference.
Fixes: 7b5b51b2b05c ("driver core: platform: count references to all kinds of firmware nodes")
Assisted-by: LLM
Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
---
Based on linux-next next-20261102 (2637bdec0535).
Compile-tested: arm64, GCC 14.2.0, W=1, CONFIG_OF_DYNAMIC=y.
COMPILE_TEST=y.
Baseline and patched target objects built from this exact base.
No full kernel/module-link, hardware or runtime test was performed.
AI assistance: Codex (LLM) for ownership analysis, code and changelog.
sound/soc/codecs/cpcap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c
index eaaf141dea57..eda72fe830ae 100644
--- a/sound/soc/codecs/cpcap.c
+++ b/sound/soc/codecs/cpcap.c
@@ -1761,7 +1761,8 @@ static int cpcap_codec_probe(struct platform_device *pdev)
if (!codec_node)
return -ENODEV;
- pdev->dev.of_node = codec_node;
+ platform_device_set_of_node(pdev, codec_node);
+ of_node_put(codec_node);
cpcap = devm_kzalloc(&pdev->dev, sizeof(*cpcap), GFP_KERNEL);
if (!cpcap)
base-commit: 2637bdec0535a2044cd830eba9a79363651d9043
reply other threads:[~2026-11-04 17:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rc-review-20261103-28-afc55c614a25@gmail.com \
--to=yigejiang86@gmail.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®