From: Mark Brown <broonie@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Charles Keepax <ckeepax@opensource.cirrus.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
Maciej Strozek <mstrozek@opensource.cirrus.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org
Subject: Re: [PATCH] ASoC: soc-dai: don't use dev_{set/get}_drvdata() on DAI
Date: Fri, 6 Mar 2026 19:44:24 +0000 [thread overview]
Message-ID: <aasumDrXSf7rfOJv@sirena.co.uk> (raw)
In-Reply-To: <871phxu8tb.wl-kuninori.morimoto.gx@renesas.com>
[-- Attachment #1: Type: text/plain, Size: 840 bytes --]
On Thu, Mar 05, 2026 at 11:59:28PM +0000, Kuninori Morimoto wrote:
> I think it would be better to remove
> snd_soc_{dai/component}_{set/get}_drvdata() ?
> At least we can regain the balance.
> dev_set_drvdata(dai->dev, data);
> ...
> - data = snd_soc_dai_get_drvdata(dai);
> + data = dev_get_drvdata(dai->dev);
> But what do you think ?
IIRC the original demand for those functions was that drivers were doing
a chain of lookups from whatever API they were working with to get back
to their driver data and that this was before there was a convenient
struct device around in all those structs. With a struct device right
there it's less clear that's buying us much, and now you mention it I
can see the potential for surprises if people think each struct has it's
own driver data. Don't know what other people's opinion is though?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-03-06 19:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 1:56 [PATCH] ASoC: soc-dai: don't use dev_{set/get}_drvdata() on DAI Kuninori Morimoto
2026-03-05 13:14 ` Charles Keepax
2026-03-05 13:34 ` Charles Keepax
2026-03-05 23:59 ` Kuninori Morimoto
2026-03-06 19:44 ` Mark Brown [this message]
2026-03-09 2:04 ` Kuninori Morimoto
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=aasumDrXSf7rfOJv@sirena.co.uk \
--to=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=mstrozek@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.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