From: Javier Martinez Canillas <javierm@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Fabio Estevam <fabio.estevam@nxp.com>,
Javier Martinez Canillas <javierm@redhat.com>,
Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Peter Rosin <peda@axentia.se>
Subject: [PATCH] ASoC: tfa9879: Export OF device ID as module alias
Date: Thu, 30 Nov 2017 18:56:16 +0100 [thread overview]
Message-ID: <20171130175616.29073-1-javierm@redhat.com> (raw)
The I2C core always reports a MODALIAS of the form i2c:<foo> even if the
device was registered via OF, this means that exporting the OF device ID
table device aliases in the module is not needed. But in order to change
how the core reports modaliases to user-space, it's better to export it.
Before this patch:
$ modinfo sound/soc/codecs/snd-soc-tfa9879.ko | grep alias
alias: i2c:tfa9879
After this patch:
$ modinfo sound/soc/codecs/snd-soc-tfa9879.ko | grep alias
alias: i2c:tfa9879
alias: of:N*T*Cnxp,tfa9879C*
alias: of:N*T*Cnxp,tfa9879
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
sound/soc/codecs/tfa9879.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/tfa9879.c b/sound/soc/codecs/tfa9879.c
index f8dd67ca0744..e7ca764b5729 100644
--- a/sound/soc/codecs/tfa9879.c
+++ b/sound/soc/codecs/tfa9879.c
@@ -316,6 +316,7 @@ static const struct of_device_id tfa9879_of_match[] = {
{ .compatible = "nxp,tfa9879", },
{ }
};
+MODULE_DEVICE_TABLE(of, tfa9879_of_match);
static struct i2c_driver tfa9879_i2c_driver = {
.driver = {
--
2.14.3
next reply other threads:[~2017-11-30 17:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 17:56 Javier Martinez Canillas [this message]
2017-11-30 18:56 ` Peter Rosin
2017-12-01 13:44 ` Applied "ASoC: tfa9879: Export OF device ID as module alias" to the asoc tree Mark Brown
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=20171130175616.29073-1-javierm@redhat.com \
--to=javierm@redhat.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--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®