Skip to content

Commit

Permalink
ASoC: tfa9879: Export OF device ID as module alias
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Javier Martinez Canillas authored and Mark Brown committed Dec 1, 2017
1 parent 4fbd8d1 commit 56ae83f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/codecs/tfa9879.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 56ae83f

Please sign in to comment.